ps: fix compiler warnings
common.h:23:19: warning: ISO C does not permit named variadic macros [-Wvariadic-macros] global.c:499:3: warning: ISO C does not support the '%Ld' gnu_printf format [-Wformat] output.c:134:1: warning: 'sr_cstime' defined but not used [-Wunused-function] output.c:816:3: warning: ISO C does not support the '%Lu' gnu_printf format [-Wformat] output.c:816:3: warning: ISO C does not support the '%Lu' gnu_printf format [-Wformat] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
bd9abebd9f
commit
60ea600599
@ -18,9 +18,9 @@
|
|||||||
#include "../proc/readproc.h"
|
#include "../proc/readproc.h"
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#define trace(args...) printf(## args)
|
#define trace(...) printf(## __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define trace(args...)
|
#define trace(...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -492,7 +492,7 @@ void self_info(void){
|
|||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"personality=0x%08x (from \"%s\")\n"
|
"personality=0x%08x (from \"%s\")\n"
|
||||||
"EUID=%d TTY=%d,%d Hertz=%Ld page_size=%d\n",
|
"EUID=%d TTY=%d,%d Hertz=%lld page_size=%d\n",
|
||||||
personality, saved_personality_text,
|
personality, saved_personality_text,
|
||||||
cached_euid, (int)major(cached_tty), (int)minor(cached_tty), Hertz,
|
cached_euid, (int)major(cached_tty), (int)minor(cached_tty), Hertz,
|
||||||
(int)(page_size)
|
(int)(page_size)
|
||||||
|
@ -131,7 +131,6 @@ static int sr_ ## NAME (const proc_t* P, const proc_t* Q) { \
|
|||||||
CMP_INT(rtprio)
|
CMP_INT(rtprio)
|
||||||
CMP_SMALL(sched)
|
CMP_SMALL(sched)
|
||||||
CMP_INT(cutime)
|
CMP_INT(cutime)
|
||||||
CMP_INT(cstime)
|
|
||||||
CMP_SMALL(priority) /* nice */
|
CMP_SMALL(priority) /* nice */
|
||||||
CMP_SMALL(nlwp)
|
CMP_SMALL(nlwp)
|
||||||
CMP_SMALL(nice) /* priority */
|
CMP_SMALL(nice) /* priority */
|
||||||
@ -817,7 +816,7 @@ static int old_time_helper(char *dst, unsigned long long t, unsigned long long r
|
|||||||
if(!t) return snprintf(dst, COLWID, " -");
|
if(!t) return snprintf(dst, COLWID, " -");
|
||||||
if(t == ~0ULL) return snprintf(dst, COLWID, " xx");
|
if(t == ~0ULL) return snprintf(dst, COLWID, " xx");
|
||||||
if((long long)(t-=rel) < 0) t=0ULL;
|
if((long long)(t-=rel) < 0) t=0ULL;
|
||||||
if(t>9999ULL) return snprintf(dst, COLWID, "%5Lu", t/100ULL);
|
if(t>9999ULL) return snprintf(dst, COLWID, "%5llu", t/100ULL);
|
||||||
else return snprintf(dst, COLWID, "%2u.%02u", (unsigned)t/100U, (unsigned)t%100U);
|
else return snprintf(dst, COLWID, "%2u.%02u", (unsigned)t/100U, (unsigned)t%100U);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user