diff options
author | Ron Yorston <rmy@pobox.com> | 2024-01-02 09:38:11 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-01-17 11:57:42 +0000 |
commit | 99d22da0e95d8356239c63199eb03f70adbf7a61 (patch) | |
tree | d7ce8b095e41d5db964f686acd3c1481a1f9b5da /include | |
parent | c0b57922a9373395c58139b2d4fe4cd865ef8223 (diff) | |
download | busybox-w32-99d22da0e95d8356239c63199eb03f70adbf7a61.tar.gz busybox-w32-99d22da0e95d8356239c63199eb03f70adbf7a61.tar.bz2 busybox-w32-99d22da0e95d8356239c63199eb03f70adbf7a61.zip |
Remove FAST_FUNC from variadic functions
The GCC documentation points out that the stdcall attribute doesn't
apply to functions which take a variable number of arguments. GCC
is silent about this during compilation but clang complains noisily.
Remove FAST_FUNC from all variadic functions. This has no effect
whatsoever on the binary resulting from a default 32-bit build.
Signed-off-by: Ron Yorston <rmy@pobox.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/include/libbb.h b/include/libbb.h index 6549c8c83..96496169d 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -980,7 +980,7 @@ int bb_putchar(int ch) FAST_FUNC; | |||
980 | /* Note: does not use stdio, writes to fd 2 directly */ | 980 | /* Note: does not use stdio, writes to fd 2 directly */ |
981 | int bb_putchar_stderr(char ch) FAST_FUNC; | 981 | int bb_putchar_stderr(char ch) FAST_FUNC; |
982 | int fputs_stdout(const char *s) FAST_FUNC; | 982 | int fputs_stdout(const char *s) FAST_FUNC; |
983 | char *xasprintf(const char *format, ...) __attribute__ ((format(printf, 1, 2))) FAST_FUNC RETURNS_MALLOC; | 983 | char *xasprintf(const char *format, ...) __attribute__ ((format(printf, 1, 2))) RETURNS_MALLOC; |
984 | char *auto_string(char *str) FAST_FUNC; | 984 | char *auto_string(char *str) FAST_FUNC; |
985 | // gcc-4.1.1 still isn't good enough at optimizing it | 985 | // gcc-4.1.1 still isn't good enough at optimizing it |
986 | // (+200 bytes compared to macro) | 986 | // (+200 bytes compared to macro) |
@@ -1416,12 +1416,12 @@ char* single_argv(char **argv) FAST_FUNC; | |||
1416 | char **skip_dash_dash(char **argv) FAST_FUNC; | 1416 | char **skip_dash_dash(char **argv) FAST_FUNC; |
1417 | extern const char *const bb_argv_dash[]; /* { "-", NULL } */ | 1417 | extern const char *const bb_argv_dash[]; /* { "-", NULL } */ |
1418 | extern uint32_t option_mask32; | 1418 | extern uint32_t option_mask32; |
1419 | uint32_t getopt32(char **argv, const char *applet_opts, ...) FAST_FUNC; | 1419 | uint32_t getopt32(char **argv, const char *applet_opts, ...); |
1420 | # define No_argument "\0" | 1420 | # define No_argument "\0" |
1421 | # define Required_argument "\001" | 1421 | # define Required_argument "\001" |
1422 | # define Optional_argument "\002" | 1422 | # define Optional_argument "\002" |
1423 | #if ENABLE_LONG_OPTS | 1423 | #if ENABLE_LONG_OPTS |
1424 | uint32_t getopt32long(char **argv, const char *optstring, const char *longopts, ...) FAST_FUNC; | 1424 | uint32_t getopt32long(char **argv, const char *optstring, const char *longopts, ...); |
1425 | #else | 1425 | #else |
1426 | #define getopt32long(argv,optstring,longopts,...) \ | 1426 | #define getopt32long(argv,optstring,longopts,...) \ |
1427 | getopt32(argv,optstring,##__VA_ARGS__) | 1427 | getopt32(argv,optstring,##__VA_ARGS__) |
@@ -1496,17 +1496,17 @@ extern uint8_t xfunc_error_retval; | |||
1496 | extern void (*die_func)(void); | 1496 | extern void (*die_func)(void); |
1497 | void xfunc_die(void) NORETURN FAST_FUNC; | 1497 | void xfunc_die(void) NORETURN FAST_FUNC; |
1498 | void bb_show_usage(void) NORETURN FAST_FUNC; | 1498 | void bb_show_usage(void) NORETURN FAST_FUNC; |
1499 | void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; | 1499 | void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); |
1500 | void bb_simple_error_msg(const char *s) FAST_FUNC; | 1500 | void bb_simple_error_msg(const char *s) FAST_FUNC; |
1501 | void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; | 1501 | void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); |
1502 | void bb_simple_error_msg_and_die(const char *s) NORETURN FAST_FUNC; | 1502 | void bb_simple_error_msg_and_die(const char *s) NORETURN FAST_FUNC; |
1503 | void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; | 1503 | void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); |
1504 | void bb_simple_perror_msg(const char *s) FAST_FUNC; | 1504 | void bb_simple_perror_msg(const char *s) FAST_FUNC; |
1505 | void bb_perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; | 1505 | void bb_perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); |
1506 | void bb_simple_perror_msg_and_die(const char *s) NORETURN FAST_FUNC; | 1506 | void bb_simple_perror_msg_and_die(const char *s) NORETURN FAST_FUNC; |
1507 | void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; | 1507 | void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); |
1508 | void bb_simple_herror_msg(const char *s) FAST_FUNC; | 1508 | void bb_simple_herror_msg(const char *s) FAST_FUNC; |
1509 | void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; | 1509 | void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); |
1510 | void bb_simple_herror_msg_and_die(const char *s) NORETURN FAST_FUNC; | 1510 | void bb_simple_herror_msg_and_die(const char *s) NORETURN FAST_FUNC; |
1511 | void bb_perror_nomsg_and_die(void) NORETURN FAST_FUNC; | 1511 | void bb_perror_nomsg_and_die(void) NORETURN FAST_FUNC; |
1512 | void bb_perror_nomsg(void) FAST_FUNC; | 1512 | void bb_perror_nomsg(void) FAST_FUNC; |
@@ -1522,7 +1522,7 @@ void bb_logenv_override(void) FAST_FUNC; | |||
1522 | typedef smalluint exitcode_t; | 1522 | typedef smalluint exitcode_t; |
1523 | 1523 | ||
1524 | #if ENABLE_FEATURE_SYSLOG_INFO | 1524 | #if ENABLE_FEATURE_SYSLOG_INFO |
1525 | void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; | 1525 | void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); |
1526 | void bb_simple_info_msg(const char *s) FAST_FUNC; | 1526 | void bb_simple_info_msg(const char *s) FAST_FUNC; |
1527 | void bb_vinfo_msg(const char *s, va_list p) FAST_FUNC; | 1527 | void bb_vinfo_msg(const char *s, va_list p) FAST_FUNC; |
1528 | #else | 1528 | #else |
@@ -1898,8 +1898,8 @@ int get_termios_and_make_raw(int fd, struct termios *newterm, struct termios *ol | |||
1898 | int set_termios_to_raw(int fd, struct termios *oldterm, int flags) FAST_FUNC; | 1898 | int set_termios_to_raw(int fd, struct termios *oldterm, int flags) FAST_FUNC; |
1899 | 1899 | ||
1900 | /* NB: "unsigned request" is crucial! "int request" will break some arches! */ | 1900 | /* NB: "unsigned request" is crucial! "int request" will break some arches! */ |
1901 | int ioctl_or_perror(int fd, unsigned request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5))) FAST_FUNC; | 1901 | int ioctl_or_perror(int fd, unsigned request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5))); |
1902 | int ioctl_or_perror_and_die(int fd, unsigned request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5))) FAST_FUNC; | 1902 | int ioctl_or_perror_and_die(int fd, unsigned request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5))); |
1903 | #if ENABLE_IOCTL_HEX2STR_ERROR | 1903 | #if ENABLE_IOCTL_HEX2STR_ERROR |
1904 | int bb_ioctl_or_warn(int fd, unsigned request, void *argp, const char *ioctl_name) FAST_FUNC; | 1904 | int bb_ioctl_or_warn(int fd, unsigned request, void *argp, const char *ioctl_name) FAST_FUNC; |
1905 | int bb_xioctl(int fd, unsigned request, void *argp, const char *ioctl_name) FAST_FUNC; | 1905 | int bb_xioctl(int fd, unsigned request, void *argp, const char *ioctl_name) FAST_FUNC; |