From d5a1c7f947ede5f811287c0150a6ed33aa4a58dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Wed, 17 Mar 2010 12:01:29 +0000 Subject: [PATCH] Be sure no return codes from getword and friends are ignored (thanks to Markus Elfring) --- include/defs.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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); -- 2.47.3