From: Alejandro Colomar Date: Fri, 14 Mar 2025 17:46:51 +0000 (+0100) Subject: man/: EXAMPLES: Add missing 'static' X-Git-Tag: man-pages-6.14~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=facbc15869a135d9d47a0884de9299a3e72ef1b5;p=thirdparty%2Fman-pages.git man/: EXAMPLES: Add missing 'static' Signed-off-by: Alejandro Colomar --- diff --git a/man/man2/sigaction.2 b/man/man2/sigaction.2 index aeefd57f9..1654d43be 100644 --- a/man/man2/sigaction.2 +++ b/man/man2/sigaction.2 @@ -1181,7 +1181,7 @@ otherwise. #include #include \& -void +static void handler(int signo, siginfo_t *info, void *context) { struct sigaction oldact; diff --git a/man/man3/atexit.3 b/man/man3/atexit.3 index f35d26807..ce69deca3 100644 --- a/man/man3/atexit.3 +++ b/man/man3/atexit.3 @@ -137,7 +137,7 @@ that are called when the shared library is unloaded. #include #include \& -void +static void bye(void) { printf("That was all, folks\[rs]n"); diff --git a/man/man3/ctime.3 b/man/man3/ctime.3 index c2d14269c..e23a70c04 100644 --- a/man/man3/ctime.3 +++ b/man/man3/ctime.3 @@ -536,7 +536,7 @@ a.out: my_mktime: Invalid argument \& #define is_signed(T) ((T) \-1 < 1) \& -time_t my_mktime(struct tm *tp); +static time_t my_mktime(struct tm *tp); \& int main(int argc, char *argv[]) @@ -575,7 +575,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } \& -time_t +static time_t my_mktime(struct tm *tp) { int e, isdst; diff --git a/man/man3/fopencookie.3 b/man/man3/fopencookie.3 index 62ae015e0..a0ae197b0 100644 --- a/man/man3/fopencookie.3 +++ b/man/man3/fopencookie.3 @@ -303,7 +303,7 @@ struct memfile_cookie { off_t offset; /* Current file offset in buf */ }; \& -ssize_t +static ssize_t memfile_write(void *c, const char *buf, size_t size) { char *new_buff; @@ -328,7 +328,7 @@ memfile_write(void *c, const char *buf, size_t size) return size; } \& -ssize_t +static ssize_t memfile_read(void *c, char *buf, size_t size) { ssize_t xbytes; @@ -348,7 +348,7 @@ memfile_read(void *c, char *buf, size_t size) return xbytes; } \& -int +static int memfile_seek(void *c, off_t *offset, int whence) { off_t new_offset; @@ -371,7 +371,7 @@ memfile_seek(void *c, off_t *offset, int whence) return 0; } \& -int +static int memfile_close(void *c) { struct memfile_cookie *cookie = c;