From: Frédéric Marchal Date: Wed, 17 Mar 2010 12:01:29 +0000 (+0000) Subject: Be sure no return codes from getword and friends are ignored (thanks to Markus Elfring) X-Git-Tag: v2.3-pre2~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5a1c7f947ede5f811287c0150a6ed33aa4a58dd;p=thirdparty%2Fsarg.git Be sure no return codes from getword and friends are ignored (thanks to Markus Elfring) --- diff --git a/include/defs.h b/include/defs.h index b725c37..b977a56 100755 --- a/include/defs.h +++ b/include/defs.h @@ -194,12 +194,12 @@ void close_usertab(void); // util.c void getword_start(/*@out@*/struct getwordstruct *gwarea, const char *line); void getword_restart(struct getwordstruct *gwarea); -int getword(/*@out@*/char *word, int limit, struct getwordstruct *gwarea, char stop); -int getword_limit(/*@out@*/char *word, int limit, struct getwordstruct *gwarea, char stop); -int getword_multisep(/*@out@*/char *word, int limit, struct getwordstruct *gwarea, char stop); -int getword_skip(int limit, struct getwordstruct *gwarea, char stop); -int getword_atoll(/*@out@*/long long int *number, struct getwordstruct *gwarea, char stop); -int getword_ptr(char *orig_line,/*@out@*/char **word, struct getwordstruct *gwarea, char stop); +__attribute__((warn_unused_result)) int getword(/*@out@*/char *word, int limit, struct getwordstruct *gwarea, char stop); +__attribute__((warn_unused_result)) int getword_limit(/*@out@*/char *word, int limit, struct getwordstruct *gwarea, char stop); +__attribute__((warn_unused_result)) int getword_multisep(/*@out@*/char *word, int limit, struct getwordstruct *gwarea, char stop); +__attribute__((warn_unused_result)) int getword_skip(int limit, struct getwordstruct *gwarea, char stop); +__attribute__((warn_unused_result)) int getword_atoll(/*@out@*/long long int *number, struct getwordstruct *gwarea, char stop); +__attribute__((warn_unused_result)) int getword_ptr(char *orig_line,/*@out@*/char **word, struct getwordstruct *gwarea, char stop); long long int my_atoll (const char *nptr); int is_absolute(const char *path); int getnumlist(char *, numlist *, const int, const int);