fix warning from needlessly-global functions
authorDenis Vlasenko <vda.linux@googlemail.com>
Mon, 22 Jan 2007 23:04:27 +0000 (23:04 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Mon, 22 Jan 2007 23:04:27 +0000 (23:04 -0000)
findutils/find.c
libbb/lineedit.c
libbb/makedev.c
libbb/perror_nomsg.c
libbb/perror_nomsg_and_die.c
procps/ps.c

index bbc97ecd4a5f4989c08ad22303cb0834ba871765..f2e3c6d0715353f5b903a30ea2512aef34d67cd2 100644 (file)
@@ -299,7 +299,7 @@ static int find_type(char *type)
 }
 #endif
 
-action*** parse_params(char **argv)
+static action*** parse_params(char **argv)
 {
        action*** appp;
        int cur_group = 0;
index 08dab26f0798a01bdc92db4365edf8b066e37dd9..bce06843be348bb4ef01bf69d8eec604bac9fb77 100644 (file)
@@ -876,7 +876,7 @@ static int get_next_history(void)
 
 #if ENABLE_FEATURE_EDITING_SAVEHISTORY
 /* state->flags is already checked to be nonzero */
-void load_history(const char *fromfile)
+static void load_history(const char *fromfile)
 {
        FILE *fp;
        int hi;
@@ -910,7 +910,7 @@ void load_history(const char *fromfile)
 }
 
 /* state->flags is already checked to be nonzero */
-void save_history(const char *tofile)
+static void save_history(const char *tofile)
 {
        FILE *fp;
 
index 4903e47836d112b15fcba87f52171d46f5f2b78e..81cd82bafae7e75544c8c3f0af7b54fce04396d6 100644 (file)
@@ -13,6 +13,9 @@
 #ifdef __GLIBC__
 /* At least glibc has horrendously large inline for this, so wrap it */
 /* uclibc people please check - do we need "&& !__UCLIBC__" above? */
+
+/* suppress gcc "no previous prototype" warning */
+unsigned long long bb_makedev(unsigned int major, unsigned int minor);
 unsigned long long bb_makedev(unsigned int major, unsigned int minor)
 {
        return makedev(major, minor);
index 8059f9fd898b43445115c203ade37da96c70984b..62ce888ae7192859d4e800cd3c4b0d9a81a5ecce 100644 (file)
@@ -13,6 +13,8 @@
 //#include "libbb.h"
 extern void bb_perror_msg(const char *s, ...);
 
+/* suppress gcc "no previous prototype" warning */
+void bb_perror_nomsg(void);
 void bb_perror_nomsg(void)
 {
        bb_perror_msg(0);
index c416df67cded4f61a3e39f7bcf40fb9169b68da8..dab3df60ab5a4599d74695c48d9ed07dfc746d40 100644 (file)
@@ -13,6 +13,8 @@
 //#include "libbb.h"
 extern void bb_perror_msg_and_die(const char *s, ...);
 
+/* suppress gcc "no previous prototype" warning */
+void bb_perror_nomsg_and_die(void);
 void bb_perror_nomsg_and_die(void)
 {
        bb_perror_msg_and_die(0);
index 12f6b65d1300b067aa510f1827ad832beffbb94f..acd9a3065fd9a81ff61a9f9e23c55b5a11fe0c87 100644 (file)
 
 /* Print value to buf, max size+1 chars (including trailing '\0') */
 
-void func_user(char *buf, int size, const procps_status_t *ps)
+static void func_user(char *buf, int size, const procps_status_t *ps)
 {
        safe_strncpy(buf, get_cached_username(ps->uid), size+1);
 }
 
-void func_comm(char *buf, int size, const procps_status_t *ps)
+static void func_comm(char *buf, int size, const procps_status_t *ps)
 {
        safe_strncpy(buf, ps->comm, size+1);
 }
 
-void func_args(char *buf, int size, const procps_status_t *ps)
+static void func_args(char *buf, int size, const procps_status_t *ps)
 {
        buf[0] = '\0';
        if (ps->cmd)
@@ -32,22 +32,22 @@ void func_args(char *buf, int size, const procps_status_t *ps)
                snprintf(buf, size+1, "[%.*s]", size-2, ps->comm);
 }
 
-void func_pid(char *buf, int size, const procps_status_t *ps)
+static void func_pid(char *buf, int size, const procps_status_t *ps)
 {
        snprintf(buf, size+1, "%*u", size, ps->pid);
 }
 
-void func_ppid(char *buf, int size, const procps_status_t *ps)
+static void func_ppid(char *buf, int size, const procps_status_t *ps)
 {
        snprintf(buf, size+1, "%*u", size, ps->ppid);
 }
 
-void func_pgid(char *buf, int size, const procps_status_t *ps)
+static void func_pgid(char *buf, int size, const procps_status_t *ps)
 {
        snprintf(buf, size+1, "%*u", size, ps->pgid);
 }
 
-void func_rss(char *buf, int size, const procps_status_t *ps)
+static void func_rss(char *buf, int size, const procps_status_t *ps)
 {
        char buf5[5];
        smart_ulltoa5( ((unsigned long long)ps->rss) << 10, buf5);