When I compile REST I get the following warning compilation message.
[ 2%] Building CXX object source/tools/CMakeFiles/RestTools.dir/__/__/rootdict/CINT_TRestReflector.cxx.o
/Users/javi/git/rest/source/tools/resttools/src/TRestReflector.cxx:95:31: warning: 'size' argument to memset is '0'; did you mean
to transpose the last two arguments? [-Wmemset-transposed-args]
memset(address, size, 0);
After the following thread on stackoverflow it looks as if there is something not good with that line. It is probably not doing what it was expected it should be doing?
The warning is proposing to exchange the 2nd and 3rd arguments, size
and 0
. I guess that would make more sense? We want to copy 0s with a given size
to the address in order to initialize?
85 void TRestReflector::Assembly() {
86 +---- 3 lines: if (!IsZombie() && onheap) {----------------------------------------------------------------------------------
89
90 if (cl != NULL) {
91 address = (char*)cl->New();
92 onheap = true;
93 } else if (dt != NULL) {
94 address = (char*)malloc(size);
95 memset(address, size, 0);
96 onheap = true;
97 }
98 }