Commit Graph

580 Commits

Author SHA1 Message Date
Phenom
fea9c0a851 Fix CppCheck in rstlvstring.h
/libretroshare/src/serialiser/rstlvstring.h:40: warning:
Cppcheck(noExplicitConstructor): Class 'RsTlvStringSet' has a
constructor with 1 argument that is not explicit.
2017-11-07 21:58:10 +01:00
Phenom
889f23f9d8 Fix CppCheck in rstlvidset.h
/libretroshare/src/serialiser/rstlvidset.h:93: warning:
Cppcheck(unreadVariable): Variable 'ok' is assigned a value that is
never used.
2017-11-07 21:57:39 +01:00
Gioacchino Mazzurco
d89c151a4d Fix typo 2017-09-17 14:41:18 +02:00
Phenom
a0ebddb4eb Fic Gcc warnings:
/libretroshare/src/file_sharing/p3filelists.cc👎 In static member
function ‘static bool p3FileDatabase::convertPointerToEntryIndex(const
void*, p3FileDatabase::EntryIndex&, uint32_t&)’:
/libretroshare/src/file_sharing/p3filelists.cc:624: warning:
dereferencing type-punned pointer will break strict-aliasing rules [-
Wstrict-aliasing]
     e   = EntryIndex(  *reinterpret_cast<uint32_t*>(&p) &
ENTRY_INDEX_BIT_MASK ) ;
/home/phenom/GIT/RetroShare/trunk/libretroshare/src/file_sharing/
p3filelists.cc:625: warning: dereferencing type-punned pointer will
break strict-aliasing rules [-Wstrict-aliasing]
     friend_index = (*reinterpret_cast<uint32_t*>(&p)) >>
NB_ENTRY_INDEX_BITS ;

/libretroshare/src/gxstrans/p3gxstransitems.h:29: In file included from
../../../trunk/libretroshare/src/gxstrans/p3gxstransitems.h:29:0,
/libretroshare/src/gxstrans/p3gxstransitems.cc:19: from ../../../trunk/
libretroshare/src/gxstrans/p3gxstransitems.cc:19:
/libretroshare/src/gxstrans/p3gxstransitems.cc👎 In member function
‘virtual void
OutgoingRecord_deprecated::serial_process(RsGenericSerializer::SerializeJob,
RsGenericSerializer::SerializeContext&)’:
/libretroshare/src/serialiser/rstypeserializer.h:61: warning:
dereferencing type-punned pointer will break strict-aliasing rules [-
Wstrict-aliasing]
  RsTypeSerializer::serial_process<T>(j, ctx, reinterpret_cast<T&>(I),
#I);\

/libretroshare/src/gxstrans/p3gxstransitems.cc:51: in expansion of macro
‘RS_REGISTER_SERIAL_MEMBER_TYPED’
  RS_REGISTER_SERIAL_MEMBER_TYPED(clientService, uint16_t);
/libretroshare/src/gxstrans/p3gxstransitems.cc👎 In member function
‘virtual void
OutgoingRecord::serial_process(RsGenericSerializer::SerializeJob,
RsGenericSerializer::SerializeContext&)’:
/libretroshare/src/serialiser/rstypeserializer.h:61: warning:
dereferencing type-punned pointer will break strict-aliasing rules [-
Wstrict-aliasing]
  RsTypeSerializer::serial_process<T>(j, ctx, reinterpret_cast<T&>(I),
#I);\

/libretroshare/src/gxstrans/p3gxstransitems.cc:65: in expansion of macro
‘RS_REGISTER_SERIAL_MEMBER_TYPED’
  RS_REGISTER_SERIAL_MEMBER_TYPED(clientService, uint16_t);
/retroshare-gui/src/gui/common/RsBanListToolButton.cpp👎 In member
function ‘void RsBanListToolButton::applyIp()’:
/retroshare-gui/src/gui/common/RsBanListToolButton.cpp:163: warning:
‘list_type’ may be used uninitialized in this function [-Wmaybe-
uninitialized]
   changed = rsBanList->removeIpRange(addr, masked_bytes, list_type);
2017-09-13 18:37:32 +02:00
Gioacchino Mazzurco
3b1606ceb9 Remove misguiding if 2017-07-24 11:52:23 +02:00
Phenom
903f875d1d Fix clang warning: unused variable 'MAX_SERIALIZED_ARRAY_SIZE'
/libretroshare/src/serialiser/rstypeserializer.cc:39: warning: unused
variable 'MAX_SERIALIZED_ARRAY_SIZE' [-Wunused-const-variable]
static const uint32_t MAX_SERIALIZED_ARRAY_SIZE = 500 ;
2017-07-16 21:36:35 +02:00
Phenom
e1ea92d733 Fix warning: unused parameter ‘n’
/libretroshare/src/serialiser/rstypeserializer.cc:358: warning: unused
parameter ‘n’ [-Wunused-parameter]
 template<> void RsTypeSerializer::print_data( const std::string& n,
2017-07-16 20:41:24 +02:00
csoler
c0c5cc52db Merge branch 'master' into gxs_mail_experiments 2017-05-13 21:08:16 +02:00
Phenom
58c812aea8 Fix Warnings: unused parameter ‘s’
warning: unused parameter ‘s’ [-Wunused-parameter]
 template<> uint32_t RsTypeSerializer::serial_size(uint16_t /*
type_subtype */,const uint32_t& s)
                                                                                               ^
2017-05-08 12:17:01 +02:00
Phenom
7892004641 Fix Warnings: unused parameter ‘member_name’
warning: unused parameter ‘member_name’ [-Wunused-parameter]
   static void serial_process(RsGenericSerializer::SerializeJob
j,RsGenericSerializer::SerializeContext& ctx,t_RsFlags32<N>& v,const
std::string& member_name)
                                                                                                                                                  ^~~~~~~~~~~
2017-05-08 12:04:08 +02:00
Gioacchino Mazzurco
ea8f800003 Port GxsTrans to new serialization system
RsItem added some comment and more verbose error reporting
RsTypeSerializer added support for RsItem derived classes as members
  added utility macros for better readability of the code and easier
  handling of RsItem derived members
  RS_REGISTER_SERIAL_MEMBER(I)
  RS_REGISTER_SERIAL_MEMBER_TYPED(I, T)
  RS_REGISTER_ITEM_TYPE(T)

RsNxsMsg::serial_process use new macros for better readability and to
 have an exemple of usage with RsTlvItem derived class
Fix undefined reference to RsNxsMsg::print
2017-05-08 00:19:11 +02:00
csoler
868c0467f2 fixed bug in serializer caused to not updating the size parameter. Also fixes unittests 2017-05-06 13:23:26 +02:00
Phenom
d31b80c13a Fix Windows Compilation 2017-05-04 11:58:45 +02:00
csoler
4f4240d570 fixed bug in history serializer 2017-05-03 22:43:16 +02:00
csoler
214aaa7c9b added safety check for null chunks in TlvMemBlock_proxy deserialization 2017-05-03 22:20:58 +02:00
csoler
99d8b7d5d8 switched service control items to new serialization 2017-05-01 21:23:34 +02:00
csoler
16b8947af1 improved serializer documentation 2017-04-30 20:31:43 +02:00
csoler
24c7c38016 removed old file rssrviceserialiser.h/cc 2017-04-30 20:08:30 +02:00
csoler
14076de1e0 moved code of rsservicerserialiser into rsserializer.h/cc and renamed it into RsRawSerializer 2017-04-30 19:17:44 +02:00
csoler
e401b90e02 moved rsserializer and rstypeserializer to serialiser/ 2017-04-30 16:05:37 +02:00
csoler
1159c863a2 moved wiki and wire items to rsitems/ 2017-04-29 21:50:55 +02:00
csoler
d58c638af8 switched wiki and wire items to new serialization 2017-04-29 21:46:54 +02:00
csoler
5cba0059c8 moved recognitems to rsitems/ 2017-04-28 23:32:47 +02:00
csoler
23492698d4 switch rsrecognitems to new serialization 2017-04-28 23:28:56 +02:00
csoler
688813fbf5 moved photo items to rsitems/ 2017-04-28 18:51:35 +02:00
csoler
634efb6142 switched rsphotoitems to new serialization 2017-04-28 18:42:11 +02:00
csoler
22e2416f3e moved rsserviceinfo items to rsitems/ 2017-04-28 17:47:41 +02:00
csoler
2d19783296 switched serviceinfo items to new serialization 2017-04-28 17:44:45 +02:00
csoler
c33c34b175 moved rspluginitems to rsitems/ 2017-04-28 16:44:04 +02:00
csoler
d32a8caf06 switched PluginItems to new serialization 2017-04-28 16:39:54 +02:00
csoler
45eaf27deb moved rsgxsupdateitems to rsitems/ 2017-04-28 16:30:33 +02:00
csoler
2e6766569d switched MsgUpdate items to new serialization 2017-04-28 16:26:59 +02:00
csoler
5995e508c5 moved rsstatusitem.h to rsitems/ 2017-04-27 21:24:27 +02:00
csoler
87018edeb2 switched rsstatusitem to new serializer 2017-04-27 21:20:30 +02:00
csoler
07a93be1b2 moved heartbeatitem.h to rsitems/ 2017-04-27 21:11:10 +02:00
csoler
9adbab3281 switched heartbeatitems to new serialization 2017-04-27 21:10:22 +02:00
csoler
349d14b354 moved rsposteditems to rsitems/ 2017-04-27 14:44:41 +02:00
csoler
35ecc19677 switched rsposteditems to new serialization 2017-04-27 14:41:31 +02:00
csoler
22f6d150df moved rsnxsitems.cc to rsitems/ 2017-04-27 14:21:46 +02:00
csoler
3c20a85335 switched RsNxsItems to new serialization 2017-04-27 14:16:57 +02:00
csoler
f6e59f7dee moved gxsforumitems to rsitems/ 2017-04-27 11:59:18 +02:00
csoler
449a4209d9 dwitched gxsforum items to new serialization 2017-04-27 11:56:56 +02:00
csoler
f50670f773 moved circle items to rsitems/ 2017-04-26 20:59:59 +02:00
csoler
559137d05b switched gxscircleitems to new serialization 2017-04-26 20:57:28 +02:00
csoler
db645239cb moved rsgxschannel items to rsitems 2017-04-26 20:15:54 +02:00
csoler
69729ad7d2 switch Channel items to new serialization 2017-04-26 18:55:23 +02:00
csoler
c31396a010 moved dsdv code to unused directory 2017-04-26 14:31:15 +02:00
csoler
508a2e2864 moved gxs comment and Id items to rsitems/ 2017-04-26 14:28:25 +02:00
csoler
c0d8735251 switched RsGxsIdItems to new serialization 2017-04-26 14:17:38 +02:00
csoler
fb34fa19c0 switch GxsComment item to new serialization 2017-04-26 13:44:09 +02:00