aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-22 23:04:27 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-22 23:04:27 +0000
commit7d6571cd719a0c2fbf672f897753bc67dc6b8db7 (patch)
tree2b79d2a50fc1d5bd68595db861151656d33bf2f7
parentd9b04c8b0425f606e7cde9ce348fc1922bb66b88 (diff)
downloadbusybox-w32-7d6571cd719a0c2fbf672f897753bc67dc6b8db7.tar.gz
busybox-w32-7d6571cd719a0c2fbf672f897753bc67dc6b8db7.tar.bz2
busybox-w32-7d6571cd719a0c2fbf672f897753bc67dc6b8db7.zip
fix warning from needlessly-global functions
git-svn-id: svn://busybox.net/trunk/busybox@17481 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--findutils/find.c2
-rw-r--r--libbb/lineedit.c4
-rw-r--r--libbb/makedev.c3
-rw-r--r--libbb/perror_nomsg.c2
-rw-r--r--libbb/perror_nomsg_and_die.c2
-rw-r--r--procps/ps.c14
6 files changed, 17 insertions, 10 deletions
diff --git a/findutils/find.c b/findutils/find.c
index bbc97ecd4..f2e3c6d07 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -299,7 +299,7 @@ static int find_type(char *type)
299} 299}
300#endif 300#endif
301 301
302action*** parse_params(char **argv) 302static action*** parse_params(char **argv)
303{ 303{
304 action*** appp; 304 action*** appp;
305 int cur_group = 0; 305 int cur_group = 0;
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 08dab26f0..bce06843b 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -876,7 +876,7 @@ static int get_next_history(void)
876 876
877#if ENABLE_FEATURE_EDITING_SAVEHISTORY 877#if ENABLE_FEATURE_EDITING_SAVEHISTORY
878/* state->flags is already checked to be nonzero */ 878/* state->flags is already checked to be nonzero */
879void load_history(const char *fromfile) 879static void load_history(const char *fromfile)
880{ 880{
881 FILE *fp; 881 FILE *fp;
882 int hi; 882 int hi;
@@ -910,7 +910,7 @@ void load_history(const char *fromfile)
910} 910}
911 911
912/* state->flags is already checked to be nonzero */ 912/* state->flags is already checked to be nonzero */
913void save_history(const char *tofile) 913static void save_history(const char *tofile)
914{ 914{
915 FILE *fp; 915 FILE *fp;
916 916
diff --git a/libbb/makedev.c b/libbb/makedev.c
index 4903e4783..81cd82baf 100644
--- a/libbb/makedev.c
+++ b/libbb/makedev.c
@@ -13,6 +13,9 @@
13#ifdef __GLIBC__ 13#ifdef __GLIBC__
14/* At least glibc has horrendously large inline for this, so wrap it */ 14/* At least glibc has horrendously large inline for this, so wrap it */
15/* uclibc people please check - do we need "&& !__UCLIBC__" above? */ 15/* uclibc people please check - do we need "&& !__UCLIBC__" above? */
16
17/* suppress gcc "no previous prototype" warning */
18unsigned long long bb_makedev(unsigned int major, unsigned int minor);
16unsigned long long bb_makedev(unsigned int major, unsigned int minor) 19unsigned long long bb_makedev(unsigned int major, unsigned int minor)
17{ 20{
18 return makedev(major, minor); 21 return makedev(major, minor);
diff --git a/libbb/perror_nomsg.c b/libbb/perror_nomsg.c
index 8059f9fd8..62ce888ae 100644
--- a/libbb/perror_nomsg.c
+++ b/libbb/perror_nomsg.c
@@ -13,6 +13,8 @@
13//#include "libbb.h" 13//#include "libbb.h"
14extern void bb_perror_msg(const char *s, ...); 14extern void bb_perror_msg(const char *s, ...);
15 15
16/* suppress gcc "no previous prototype" warning */
17void bb_perror_nomsg(void);
16void bb_perror_nomsg(void) 18void bb_perror_nomsg(void)
17{ 19{
18 bb_perror_msg(0); 20 bb_perror_msg(0);
diff --git a/libbb/perror_nomsg_and_die.c b/libbb/perror_nomsg_and_die.c
index c416df67c..dab3df60a 100644
--- a/libbb/perror_nomsg_and_die.c
+++ b/libbb/perror_nomsg_and_die.c
@@ -13,6 +13,8 @@
13//#include "libbb.h" 13//#include "libbb.h"
14extern void bb_perror_msg_and_die(const char *s, ...); 14extern void bb_perror_msg_and_die(const char *s, ...);
15 15
16/* suppress gcc "no previous prototype" warning */
17void bb_perror_nomsg_and_die(void);
16void bb_perror_nomsg_and_die(void) 18void bb_perror_nomsg_and_die(void)
17{ 19{
18 bb_perror_msg_and_die(0); 20 bb_perror_msg_and_die(0);
diff --git a/procps/ps.c b/procps/ps.c
index 12f6b65d1..acd9a3065 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -13,17 +13,17 @@
13 13
14/* Print value to buf, max size+1 chars (including trailing '\0') */ 14/* Print value to buf, max size+1 chars (including trailing '\0') */
15 15
16void func_user(char *buf, int size, const procps_status_t *ps) 16static void func_user(char *buf, int size, const procps_status_t *ps)
17{ 17{
18 safe_strncpy(buf, get_cached_username(ps->uid), size+1); 18 safe_strncpy(buf, get_cached_username(ps->uid), size+1);
19} 19}
20 20
21void func_comm(char *buf, int size, const procps_status_t *ps) 21static void func_comm(char *buf, int size, const procps_status_t *ps)
22{ 22{
23 safe_strncpy(buf, ps->comm, size+1); 23 safe_strncpy(buf, ps->comm, size+1);
24} 24}
25 25
26void func_args(char *buf, int size, const procps_status_t *ps) 26static void func_args(char *buf, int size, const procps_status_t *ps)
27{ 27{
28 buf[0] = '\0'; 28 buf[0] = '\0';
29 if (ps->cmd) 29 if (ps->cmd)
@@ -32,22 +32,22 @@ void func_args(char *buf, int size, const procps_status_t *ps)
32 snprintf(buf, size+1, "[%.*s]", size-2, ps->comm); 32 snprintf(buf, size+1, "[%.*s]", size-2, ps->comm);
33} 33}
34 34
35void func_pid(char *buf, int size, const procps_status_t *ps) 35static void func_pid(char *buf, int size, const procps_status_t *ps)
36{ 36{
37 snprintf(buf, size+1, "%*u", size, ps->pid); 37 snprintf(buf, size+1, "%*u", size, ps->pid);
38} 38}
39 39
40void func_ppid(char *buf, int size, const procps_status_t *ps) 40static void func_ppid(char *buf, int size, const procps_status_t *ps)
41{ 41{
42 snprintf(buf, size+1, "%*u", size, ps->ppid); 42 snprintf(buf, size+1, "%*u", size, ps->ppid);
43} 43}
44 44
45void func_pgid(char *buf, int size, const procps_status_t *ps) 45static void func_pgid(char *buf, int size, const procps_status_t *ps)
46{ 46{
47 snprintf(buf, size+1, "%*u", size, ps->pgid); 47 snprintf(buf, size+1, "%*u", size, ps->pgid);
48} 48}
49 49
50void func_rss(char *buf, int size, const procps_status_t *ps) 50static void func_rss(char *buf, int size, const procps_status_t *ps)
51{ 51{
52 char buf5[5]; 52 char buf5[5];
53 smart_ulltoa5( ((unsigned long long)ps->rss) << 10, buf5); 53 smart_ulltoa5( ((unsigned long long)ps->rss) << 10, buf5);