summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-28 20:52:30 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-28 20:52:30 -0700
commit0b97213aa640aa6a05b9cb298349e45403bf7958 (patch)
tree741ad64bc781f54b747e41d6a0a5efa4d9e7ca98
parent1ac4dd6c7abe6fe185c0dafb3bb592720128a737 (diff)
Silence gcc complaint about being unable to check printf format string
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xdpyinfo.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/xdpyinfo.c b/xdpyinfo.c
index c0e8181..dcca0ad 100644
--- a/xdpyinfo.c
+++ b/xdpyinfo.c
@@ -619,8 +619,7 @@ print_multibuf_info(Display *dpy, const char *extname)
int i, j; /* temp variable: iterator */
int nmono, nstereo; /* count */
XmbufBufferInfo *mono_info = NULL, *stereo_info = NULL; /* arrays */
- static const char *fmt =
- " visual id, max buffers, depth: 0x%lx, %d, %d\n";
+#define MULTIBUF_FMT " visual id, max buffers, depth: 0x%lx, %d, %d\n"
int scr = 0;
int majorrev, minorrev;
@@ -639,12 +638,12 @@ print_multibuf_info(Display *dpy, const char *extname)
} else {
printf (" screen %d number of mono multibuffer types: %d\n", i, nmono);
for (j = 0; j < nmono; j++) {
- printf (fmt, mono_info[j].visualid, mono_info[j].max_buffers,
- mono_info[j].depth);
+ printf (MULTIBUF_FMT, mono_info[j].visualid,
+ mono_info[j].max_buffers, mono_info[j].depth);
}
printf (" number of stereo multibuffer types: %d\n", nstereo);
for (j = 0; j < nstereo; j++) {
- printf (fmt, stereo_info[j].visualid,
+ printf (MULTIBUF_FMT, stereo_info[j].visualid,
stereo_info[j].max_buffers, stereo_info[j].depth);
}
if (mono_info) XFree ((char *) mono_info);