c++ - memset used with zero length parameter: ignore or watch out? -


While I'm linking to a dynamic library, there is a problem finding information about the following warning: < 'MyClass :: myfunc ()' in the pre> function: MyClass.cpp :(. Text + 0x14e4): Warning: is used with constant zero-length parameters; This can be caused by transpised parameters

here is a part of myfunc :

  zero MyClass :: myfunc () {Vector & lt; Variable * & gt; :: const_iterator; (This is = m_vars.begin () = it! = M_vars.end (); ++ this) {if ((* *) -> record) {MyRecord * R = new MyRecord (* this); InitMyRecord (* r); M_records.push_back (r); }}}   

So I'm too much trapped, should be looking for possible causes of this mammet Calling the new operator is my first suspect, but I do not even know that it is worth searching for it. I am not sure whether I should take this warning seriously or pass it.

Q: What should I do about this warning?

Update: Here is a Myrecord constructor, which is in the header file, and also to make sure what results I have to see? So if I understand correctly, I may or may be. MyRecord {public: MyRecord (Constant Variable * var): buffer (0), last save (-1 * std :: Numeric_limits gt; :: max) ), Sample (100), buffess (100), gv (var), rec_function (0) {}; Virtual ~ record () {if (rec_function) delete rec_function; Rec_function = 0; }; Private: Record (Constellation & amp;); Record & amp; Operator = (Constant Records & Rec); Public: // @Todo: Promote promotions: circular_buffer & lt; Promote: Tuple & LT; Double, Promote :: Any & gt; & Gt; Buffer; Repeating; Double sample; Unsigned int bufsize; Constant Variable * GV; Recordfactory * rec_function; };

The recordfucker is a pure-virtual structure:

  struct RecordFunctor {virtual ~ RecordFunctor () {}; Virtual Empty Record (CUST =) = 0; };   

Additional information? With flags -O2 and G ++ (Ubuntu / Linaro 4.6.1-9ubuntu3) 4.6.1

You're calling with the capability of 0. This probably causes that constructor to start the storage used by the reason for calling memset () circular buffer, but you have told that you want a zero size buffer Are there.

The solution circular_buffer is to give the actual shape to the constructor, zero (does not mean zero).

Comments