#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
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks