Changeset d427f08 for global.c


Ignore:
Timestamp:
Jun 22, 2011, 3:40:50 PM (10 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
b343c2c
Parents:
84a071f
git-author:
Jason Gross <jgross@mit.edu> (06/06/11 05:24:30)
git-committer:
Nelson Elhage <nelhage@mit.edu> (06/22/11 15:40:50)
Message:
Use G_GNUC_WARN_UNUSED_RESULT

Have gcc warn us when we ignore the result of a function that requires
the caller to free the result, or an initilization function that can
fail.  This might help (slightly) with preventing leaks and segfaults.

Additionally changed some functions that should never fail to not
return values.  (The owl_list_* functions changed only fail if
list->size < 0, which we assume is not the case elsewhere.)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    raa69c1e rd427f08  
    173173/* Pops the current context from the context stack and returns it. Caller is
    174174 * responsible for freeing. */
    175 owl_context *owl_global_pop_context_no_delete(owl_global *g) {
     175G_GNUC_WARN_UNUSED_RESULT owl_context *owl_global_pop_context_no_delete(owl_global *g)
     176{
    176177  owl_context *c;
    177178  if (!g->context_stack)
     
    725726 * necessary.
    726727 */
    727 owl_message *owl_global_messagequeue_popmsg(owl_global *g)
     728owl_message G_GNUC_WARN_UNUSED_RESULT *owl_global_messagequeue_popmsg(owl_global *g)
    728729{
    729730  owl_message *out;
Note: See TracChangeset for help on using the changeset viewer.