Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#56 memset with number of bytes set to 0 in array.cc

pre 0.12 SVN
closed-fixed
Jin
1
2010-04-06
2009-11-26
Anonymous
No

Compile log:
libmediatomb.a(libmediatomb_a-array.o): In function `memset':
/usr/include/bits/string3.h:82: warning: memset used with constant zero length parameter; this could be due to transposed parameters
libmediatomb.a(libmediatomb_a-array.o): In function `zmm::ArrayBase::clear()':
array.cc:(.text+0xed): undefined reference to `__warn_memset_zero_len'

I couldn't find the cause of "undefined reference to `__warn_memset_zero_len'", but the whole error is generated by memset function called with length parameter = 0 (in zmm::ArrayBase::clear() method):
siz = 0;
memset(arr, 0, siz * sizeof(Object *));

Error is fixed by moving siz=0; after memset.

Discussion

  • Jin
    Jin
    2009-12-21

    • assigned_to: nobody --> jin_eld
    • milestone: --> pre 0.12 SVN
    • priority: 5 --> 6
    • status: open --> open-accepted
     
  • Jin
    Jin
    2010-01-04

    fixed in revision 2040

     
  • Jin
    Jin
    2010-01-04

    • priority: 6 --> 1
    • status: open-accepted --> open-fixed
     
  • Jin
    Jin
    2010-04-06

    • status: open-fixed --> closed-fixed