summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Klausner <tk@giga.or.at>2021-12-07 08:59:14 +0100
committerAlan Coopersmith <alan.coopersmith@oracle.com>2021-12-07 10:36:18 -0800
commit43c6dc5894e6f64d6efaae7fd572fda00559cfdd (patch)
treed4a3ca9df1a9401c520044df86fd1adb9c461b32
parenta957eb52df4a0c593f862790728c692ea11c42e8 (diff)
Match format strings with arguments.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--fd.c12
-rw-r--r--print_wcp.c10
2 files changed, 11 insertions, 11 deletions
diff --git a/fd.c b/fd.c
index d07d3a3..8ccdada 100644
--- a/fd.c
+++ b/fd.c
@@ -452,10 +452,10 @@ MainLoop(void)
debug(128,
(stderr,
"select %d, rfds = %#lx, wfds = %#lx, RD=%#lx, BRD=%#lx, WD=%#lx\n",
- HighestFD + 1, __XFDS_BITS(&rfds, 0), __XFDS_BITS(&wfds, 0),
- __XFDS_BITS(&ReadDescriptors, 0),
- __XFDS_BITS(&BlockedReadDescriptors, 0),
- __XFDS_BITS(&WriteDescriptors, 0)));
+ HighestFD + 1, (unsigned long)__XFDS_BITS(&rfds, 0), (unsigned long)__XFDS_BITS(&wfds, 0),
+ (unsigned long)__XFDS_BITS(&ReadDescriptors, 0),
+ (unsigned long)__XFDS_BITS(&BlockedReadDescriptors, 0),
+ (unsigned long)__XFDS_BITS(&WriteDescriptors, 0)));
if (Interrupt || (!XFD_ANYSET(&rfds) && !XFD_ANYSET(&wfds))) {
ReadCommands();
@@ -467,8 +467,8 @@ MainLoop(void)
debug(128,
(stderr,
"select nfds = %d, rfds = %#lx, wfds = %#lx, xfds = %#lx\n",
- nfds, __XFDS_BITS(&rfds, 0), __XFDS_BITS(&wfds, 0),
- __XFDS_BITS(&xfds, 0)));
+ nfds, (unsigned long)__XFDS_BITS(&rfds, 0), (unsigned long)__XFDS_BITS(&wfds, 0),
+ (unsigned long)__XFDS_BITS(&xfds, 0)));
if (nfds < 0) {
if (errno == EINTR)
diff --git a/print_wcp.c b/print_wcp.c
index f8b5506..df5527b 100644
--- a/print_wcp.c
+++ b/print_wcp.c
@@ -70,7 +70,7 @@ WcpAnalyzeImage1RLL(const char *buf, int len, int width, int height)
while (!error && height--) {
x = 0;
if (Verbose > 2)
- fprintf(stdout, "%s %9d %9d:", Leader, y, (char *) data - buf);
+ fprintf(stdout, "%s %9d %9ld:", Leader, y, (char *) data - buf);
NextByte(byte);
if (Verbose > 2)
fprintf(stdout, " %2x", byte);
@@ -100,7 +100,7 @@ WcpAnalyzeImage1RLL(const char *buf, int len, int width, int height)
y++;
}
if (error)
- fprintf(stdout, "%s%20s: %d, %d %d\n", Leader, error,
+ fprintf(stdout, "%s%20s: %d, %d %ld\n", Leader, error,
x, y - 1, (char *) data - buf);
}
@@ -177,7 +177,7 @@ WcpAnalyzeImageNLRU(const char *buf, int len, int width, int height, int bytes)
while (!error && height--) {
x = 0;
if (Verbose > 2)
- fprintf(stdout, "%s %9d %9d:", Leader, y, (char *) data - buf);
+ fprintf(stdout, "%s %9d %9ld:", Leader, y, (char *) data - buf);
NextByte(byte);
if (Verbose > 2)
fprintf(stdout, " %2x", byte);
@@ -217,7 +217,7 @@ WcpAnalyzeImageNLRU(const char *buf, int len, int width, int height, int bytes)
break;
}
x += run;
- fprintf(stdout, " %3ld:%0*x", run, bytes * 2, pix);
+ fprintf(stdout, " %3ld:%0*lx", run, bytes * 2, pix);
}
break;
}
@@ -226,7 +226,7 @@ WcpAnalyzeImageNLRU(const char *buf, int len, int width, int height, int bytes)
y++;
}
if (error)
- fprintf(stdout, "%s%20s: %d, %d %d\n", Leader, error,
+ fprintf(stdout, "%s%20s: %d, %d %ld\n", Leader, error,
x, y - 1, (char *) data - buf);
}