[asterisk-dev] murf: trunk r84330 - /trunk/utils/check_expr.c

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue Oct 2 08:48:47 CDT 2007


On Tuesday 02 October 2007 03:02:31 Tony Mountifield wrote:
> SVN commits to the Digium repositories <svn-commits at lists.digium.com> wrote:
> > +void ast_mark_lock_acquired(void);
> >  void ast_mark_lock_acquired(void)
> >  {
> >      /* not a lot to do in a standalone w/o threading! */
> >  }
>
> That looks bizarre. What on earth is the compiler complaining about that
> requires that kind of construct to shut it up?

-Wdeclarations

Basically, a public API function must have a declaration (prototype) prior to
its definition.  In the main code, it does, in the header file, but the header
files assume all sorts of stuff, such as the code is multithreaded.  This
file uses main code, to avoid code duplication, but it does not need all of
the fancy multithreaded functions (since it is a single-threaded utility), so
it fakes out the dependencies with empty functions.

-- 
Tilghman



More information about the asterisk-dev mailing list