svn commit: trunk/busybox/procps
vodz at busybox.net
vodz at busybox.net
Mon Jan 30 13:58:36 UTC 2006
Author: vodz
Date: 2006-01-30 05:58:34 -0800 (Mon, 30 Jan 2006)
New Revision: 13711
Log:
removed warning "comparison between signed and unsigned". Added ATTRIBUTE_UNUSED. My whitespace
Modified:
trunk/busybox/procps/top.c
Changeset:
Modified: trunk/busybox/procps/top.c
===================================================================
--- trunk/busybox/procps/top.c 2006-01-30 13:51:50 UTC (rev 13710)
+++ trunk/busybox/procps/top.c 2006-01-30 13:58:34 UTC (rev 13711)
@@ -133,20 +133,20 @@
#define FILE_TO_BUF(filename, fd) do{ \
if (fd == -1 && (fd = open(filename, O_RDONLY)) == -1) { \
bb_perror_msg_and_die("/proc not be mounted?"); \
- } \
+ } \
lseek(fd, 0L, SEEK_SET); \
if ((local_n = read(fd, buf, sizeof buf - 1)) < 0) { \
bb_perror_msg_and_die("%s", filename); \
- } \
- buf[local_n] = '\0'; \
+ } \
+ buf[local_n] = '\0'; \
}while(0)
#define FILE_TO_BUF2(filename, fd) do{ \
lseek(fd, 0L, SEEK_SET); \
if ((local_n = read(fd, buf, sizeof buf - 1)) < 0) { \
bb_perror_msg_and_die("%s", filename); \
- } \
- buf[local_n] = '\0'; \
+ } \
+ buf[local_n] = '\0'; \
}while(0)
static void init_Hertz_value(void) {
@@ -395,7 +395,7 @@
s->pid, s->user, s->state, rss_str_buf, s->ppid,
pmem/10, pmem%10);
#endif
- if(strlen(namecmd) > col)
+ if((int)strlen(namecmd) > col)
namecmd[col] = 0;
printf("%s\n", namecmd);
s++;
@@ -428,7 +428,7 @@
#endif /* CONFIG_FEATURE_CLEAN_UP */
}
-static void sig_catcher (int sig)
+static void sig_catcher (int sig ATTRIBUTE_UNUSED)
{
reset_term();
}
More information about the busybox-cvs
mailing list