]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
Mark local functions as static
authorGuillem Jover <guillem@hadrons.org>
Fri, 19 Feb 2021 05:49:24 +0000 (06:49 +0100)
committerGuillem Jover <guillem@hadrons.org>
Sun, 28 Feb 2021 04:30:25 +0000 (05:30 +0100)
Warned-by: gcc
src/closefrom.c
test/funopen.c
test/md5.c

index 087ccad87db47f57fa0c8d34f84dab4d59d659ba..2df5d03e362a6197ef48815132a1a97f2e6cbdcb 100644 (file)
@@ -79,7 +79,7 @@ sys_close_range(unsigned int fd, unsigned int max_fd, unsigned int flags)
  * Close all file descriptors greater than or equal to lowfd.
  * This is the expensive (fallback) method.
  */
-void
+static void
 closefrom_fallback(int lowfd)
 {
        long fd, maxfd;
index aae558cecc2120ecbdbfa9c910620a408323a773..2b34f7e6c3318f6d30ec0d6ffad9a464fa54763c 100644 (file)
@@ -37,7 +37,7 @@ struct test_cookie {
        int index;
 };
 
-int
+static int
 test_readfn(void *cookie, char *buf, int size)
 {
        struct test_cookie *tc = cookie;
@@ -56,7 +56,7 @@ test_readfn(void *cookie, char *buf, int size)
        return size;
 }
 
-int
+static int
 test_writefn(void *cookie, const char *buf, int size)
 {
        struct test_cookie *tc = cookie;
@@ -75,7 +75,7 @@ test_writefn(void *cookie, const char *buf, int size)
        return size;
 }
 
-off_t
+static off_t
 test_seekfn(void *cookie, off_t offset, int whence)
 {
        struct test_cookie *tc = cookie;
@@ -95,7 +95,7 @@ test_seekfn(void *cookie, off_t offset, int whence)
        return tc->index;
 }
 
-int
+static int
 test_closefn(void *cookie)
 {
        struct test_cookie *tc = cookie;
index d421ab896e8537f766a4bfbfb60e3549d4a12cae..bc2ed7d920c76355969a544555eae33cf78b72c3 100644 (file)
@@ -28,7 +28,7 @@
 #include <md5.h>
 #include <string.h>
 
-void
+static void
 test_md5(const char *digest, const char *string)
 {
        char result[MD5_DIGEST_STRING_LENGTH];