[asterisk-dev] Bug in asterisk/strings.h include file (Asterisk 11)

Pavel Troller patrol at sinus.cz
Tue Jan 1 23:29:52 CST 2013

  During compilation of a third-party module, I noticed a warning about
"struct ast_str declared inside parameter list", generated during processing
of asterisk/strings.h. It seems that compiler is right, because the prototype
of ast_regex_string_to_regex_pattern() function on line 268 contains 
"struct ast_str **regex_pattern" parameter, but struct ast_str is declared
later, on line 379.
  I've solved the problem by moving the prototype to the very end of the
file in my local installed copy of asterisk/strings.h. Maybe a better 
rearrangement is possible, like moving structure declarations above the
prototype section, which is a common practice in include files, but I don't
want to judge it, I'm just reporting this little problem.
  With regards,
    Pavel Troller

P.S. Happy New Year to all the Aserisk community!

More information about the asterisk-dev mailing list