mirror of
https://github.com/rfc1036/whois.git
synced 2026-05-03 06:51:09 +00:00
Annotate do_nofail() with malloc(free) and returns_nonnull
Or else the compiler will be unable to understand that the NOFAIL() macro never returns a NULL pointer.
This commit is contained in:
parent
23302dbd1d
commit
f01f8d405b
7
utils.h
7
utils.h
@ -17,8 +17,12 @@
|
||||
/* Portability macros */
|
||||
#ifdef __GNUC__
|
||||
# define NORETURN __attribute__((noreturn))
|
||||
# define MALLOC_FREE __attribute__((malloc(free)))
|
||||
# define NONNULL __attribute__((returns_nonnull))
|
||||
#else
|
||||
# define NORETURN
|
||||
# define MALLOC_FREE
|
||||
# define NONNULL
|
||||
#endif
|
||||
|
||||
#ifndef AI_IDN
|
||||
@ -55,7 +59,8 @@
|
||||
#endif
|
||||
|
||||
/* Prototypes */
|
||||
void *do_nofail(void *ptr, const char *file, const int line);
|
||||
void *MALLOC_FREE NONNULL do_nofail(void *ptr, const char *file, const int line)
|
||||
;
|
||||
char **merge_args(char *args, char *argv[], int *argc);
|
||||
|
||||
void NORETURN err_quit(const char *fmt, ...);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user