Changeset 6829afc for functions.c


Ignore:
Timestamp:
Jun 25, 2011, 3:26:15 AM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
12294d2
Parents:
95b52d1
git-author:
David Benjamin <davidben@mit.edu> (06/24/11 22:56:15)
git-committer:
David Benjamin <davidben@mit.edu> (06/25/11 03:26:15)
Message:
Define CALLER_OWN macro

Replace our exising uses of G_GNUC_WARN_UNUSED_RESULT with it. The
old macro is just way too long. This also more clearly specifies the
intent.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    rb470451 r6829afc  
    1414#include "filterproc.h"
    1515
    16 G_GNUC_WARN_UNUSED_RESULT char *owl_function_command(const char *cmdbuff)
     16CALLER_OWN char *owl_function_command(const char *cmdbuff)
    1717{
    1818  owl_function_debugmsg("executing command: %s", cmdbuff);
     
    2121}
    2222
    23 G_GNUC_WARN_UNUSED_RESULT char *owl_function_command_argv(const char *const *argv, int argc)
     23CALLER_OWN char *owl_function_command_argv(const char *const *argv, int argc)
    2424{
    2525  return owl_cmddict_execute_argv(owl_global_get_cmddict(&g),
     
    9595}
    9696
    97 G_GNUC_WARN_UNUSED_RESULT char *owl_function_style_describe(const char *name)
     97CALLER_OWN char *owl_function_style_describe(const char *name)
    9898{
    9999  const char *desc;
     
    112112}
    113113
    114 G_GNUC_WARN_UNUSED_RESULT char *owl_function_cmd_describe(const char *name)
     114CALLER_OWN char *owl_function_cmd_describe(const char *name)
    115115{
    116116  const owl_cmd *cmd = owl_cmddict_find(owl_global_get_cmddict(&g), name);
     
    250250 * owl_global_messagequeue_addmsg() for that.
    251251 */
    252 G_GNUC_WARN_UNUSED_RESULT owl_message *owl_function_make_outgoing_aim(const char *body, const char *to)
     252CALLER_OWN owl_message *owl_function_make_outgoing_aim(const char *body, const char *to)
    253253{
    254254  owl_message *m;
     
    271271 * owl_global_messagequeue_addmsg() for that.
    272272 */
    273 G_GNUC_WARN_UNUSED_RESULT owl_message *owl_function_make_outgoing_loopback(const char *body)
     273CALLER_OWN owl_message *owl_function_make_outgoing_loopback(const char *body)
    274274{
    275275  owl_message *m;
     
    19001900}
    19011901
    1902 G_GNUC_WARN_UNUSED_RESULT owl_editwin *owl_function_start_question(const char *line)
     1902CALLER_OWN owl_editwin *owl_function_start_question(const char *line)
    19031903{
    19041904  owl_editwin *tw;
     
    19151915}
    19161916
    1917 G_GNUC_WARN_UNUSED_RESULT owl_editwin *owl_function_start_password(const char *line)
     1917CALLER_OWN owl_editwin *owl_function_start_password(const char *line)
    19181918{
    19191919  owl_editwin *tw;
     
    19321932}
    19331933
    1934 G_GNUC_WARN_UNUSED_RESULT char *owl_function_exec(int argc, const char *const *argv, const char *buff, int type)
     1934CALLER_OWN char *owl_function_exec(int argc, const char *const *argv, const char *buff, int type)
    19351935{
    19361936  /* if type == 1 display in a popup
     
    19751975}
    19761976
    1977 G_GNUC_WARN_UNUSED_RESULT char *owl_function_perl(int argc, const char *const *argv, const char *buff, int type)
     1977CALLER_OWN char *owl_function_perl(int argc, const char *const *argv, const char *buff, int type)
    19781978{
    19791979  /* if type == 1 display in a popup
     
    21452145 * Returns the name of the negated filter, which the caller must free.
    21462146 */
    2147 G_GNUC_WARN_UNUSED_RESULT char *owl_function_create_negative_filter(const char *filtername)
     2147CALLER_OWN char *owl_function_create_negative_filter(const char *filtername)
    21482148{
    21492149  char *newname;
     
    22422242 * If 'related' is nonzero, encompass unclasses and .d classes as well.
    22432243 */
    2244 G_GNUC_WARN_UNUSED_RESULT char *owl_function_classinstfilt(const char *c, const char *i, int related)
     2244CALLER_OWN char *owl_function_classinstfilt(const char *c, const char *i, int related)
    22452245{
    22462246  owl_filter *f;
     
    23292329 * the filter, which the caller must free.
    23302330 */
    2331 G_GNUC_WARN_UNUSED_RESULT char *owl_function_zuserfilt(const char *longuser)
     2331CALLER_OWN char *owl_function_zuserfilt(const char *longuser)
    23322332{
    23332333  owl_filter *f;
     
    23752375 * Returns the name of the filter, which the caller must free.
    23762376 */
    2377 G_GNUC_WARN_UNUSED_RESULT char *owl_function_aimuserfilt(const char *user)
     2377CALLER_OWN char *owl_function_aimuserfilt(const char *user)
    23782378{
    23792379  owl_filter *f;
     
    24132413}
    24142414
    2415 G_GNUC_WARN_UNUSED_RESULT char *owl_function_typefilt(const char *type)
     2415CALLER_OWN char *owl_function_typefilt(const char *type)
    24162416{
    24172417  owl_filter *f;
     
    24692469}
    24702470
    2471 static G_GNUC_WARN_UNUSED_RESULT char *owl_function_smartfilter_cc(const owl_message *m)
     2471static CALLER_OWN char *owl_function_smartfilter_cc(const owl_message *m)
    24722472{
    24732473  const char *ccs;
     
    25212521 *    name to the AIM conversation with that user
    25222522 */
    2523 G_GNUC_WARN_UNUSED_RESULT char *owl_function_smartfilter(int type, int invert_related)
     2523CALLER_OWN char *owl_function_smartfilter(int type, int invert_related)
    25242524{
    25252525  const owl_view *v;
     
    28602860}
    28612861
    2862 G_GNUC_WARN_UNUSED_RESULT char *owl_function_keymap_summary(const char *name)
     2862CALLER_OWN char *owl_function_keymap_summary(const char *name)
    28632863{
    28642864  const owl_keymap *km
     
    29742974/* strips formatting from ztext and returns the unformatted text.
    29752975 * caller is responsible for freeing. */
    2976 G_GNUC_WARN_UNUSED_RESULT char *owl_function_ztext_stylestrip(const char *zt)
     2976CALLER_OWN char *owl_function_ztext_stylestrip(const char *zt)
    29772977{
    29782978  owl_fmtext fm;
Note: See TracChangeset for help on using the changeset viewer.