svn commit: trunk/busybox: findutils libbb procps
vda at busybox.net
vda at busybox.net
Mon Jan 22 23:04:30 UTC 2007
Author: vda
Date: 2007-01-22 15:04:27 -0800 (Mon, 22 Jan 2007)
New Revision: 17481
Log:
fix warning from needlessly-global functions
Modified:
trunk/busybox/findutils/find.c
trunk/busybox/libbb/lineedit.c
trunk/busybox/libbb/makedev.c
trunk/busybox/libbb/perror_nomsg.c
trunk/busybox/libbb/perror_nomsg_and_die.c
trunk/busybox/procps/ps.c
Changeset:
Modified: trunk/busybox/findutils/find.c
===================================================================
--- trunk/busybox/findutils/find.c 2007-01-22 22:47:07 UTC (rev 17480)
+++ trunk/busybox/findutils/find.c 2007-01-22 23:04:27 UTC (rev 17481)
@@ -299,7 +299,7 @@
}
#endif
-action*** parse_params(char **argv)
+static action*** parse_params(char **argv)
{
action*** appp;
int cur_group = 0;
Modified: trunk/busybox/libbb/lineedit.c
===================================================================
--- trunk/busybox/libbb/lineedit.c 2007-01-22 22:47:07 UTC (rev 17480)
+++ trunk/busybox/libbb/lineedit.c 2007-01-22 23:04:27 UTC (rev 17481)
@@ -876,7 +876,7 @@
#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 @@
}
/* state->flags is already checked to be nonzero */
-void save_history(const char *tofile)
+static void save_history(const char *tofile)
{
FILE *fp;
Modified: trunk/busybox/libbb/makedev.c
===================================================================
--- trunk/busybox/libbb/makedev.c 2007-01-22 22:47:07 UTC (rev 17480)
+++ trunk/busybox/libbb/makedev.c 2007-01-22 23:04:27 UTC (rev 17481)
@@ -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);
Modified: trunk/busybox/libbb/perror_nomsg.c
===================================================================
--- trunk/busybox/libbb/perror_nomsg.c 2007-01-22 22:47:07 UTC (rev 17480)
+++ trunk/busybox/libbb/perror_nomsg.c 2007-01-22 23:04:27 UTC (rev 17481)
@@ -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);
Modified: trunk/busybox/libbb/perror_nomsg_and_die.c
===================================================================
--- trunk/busybox/libbb/perror_nomsg_and_die.c 2007-01-22 22:47:07 UTC (rev 17480)
+++ trunk/busybox/libbb/perror_nomsg_and_die.c 2007-01-22 23:04:27 UTC (rev 17481)
@@ -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);
Modified: trunk/busybox/procps/ps.c
===================================================================
--- trunk/busybox/procps/ps.c 2007-01-22 22:47:07 UTC (rev 17480)
+++ trunk/busybox/procps/ps.c 2007-01-22 23:04:27 UTC (rev 17481)
@@ -13,17 +13,17 @@
/* 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 @@
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);
More information about the busybox-cvs
mailing list