Changeset d427f08 for logging.c


Ignore:
Timestamp:
Jun 22, 2011, 3:40:50 PM (13 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, 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
  • logging.c

    rcc305b5 rd427f08  
    8080}
    8181
    82 char *owl_log_zephyr(const owl_message *m) {
     82G_GNUC_WARN_UNUSED_RESULT char *owl_log_zephyr(const owl_message *m)
     83{
    8384    char *tmp = NULL;
    8485    GString *buffer = NULL;
     
    103104}
    104105
    105 char *owl_log_aim(const owl_message *m) {
     106G_GNUC_WARN_UNUSED_RESULT char *owl_log_aim(const owl_message *m)
     107{
    106108    GString *buffer = NULL;
    107109    buffer = g_string_new("");
     
    120122}
    121123
    122 char *owl_log_jabber(const owl_message *m) {
     124G_GNUC_WARN_UNUSED_RESULT char *owl_log_jabber(const owl_message *m)
     125{
    123126    GString *buffer = NULL;
    124127    buffer = g_string_new("");
     
    132135}
    133136
    134 char *owl_log_generic(const owl_message *m) {
     137G_GNUC_WARN_UNUSED_RESULT char *owl_log_generic(const owl_message *m)
     138{
    135139    GString *buffer;
    136140    buffer = g_string_new("");
Note: See TracChangeset for help on using the changeset viewer.