diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-09-28 20:52:30 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-09-28 20:52:30 -0700 |
commit | 0b97213aa640aa6a05b9cb298349e45403bf7958 (patch) | |
tree | 741ad64bc781f54b747e41d6a0a5efa4d9e7ca98 | |
parent | 1ac4dd6c7abe6fe185c0dafb3bb592720128a737 (diff) | |
download | xdpyinfo-0b97213aa640aa6a05b9cb298349e45403bf7958.tar.gz xdpyinfo-0b97213aa640aa6a05b9cb298349e45403bf7958.tar.bz2 xdpyinfo-0b97213aa640aa6a05b9cb298349e45403bf7958.zip |
Silence gcc complaint about being unable to check printf format string
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xdpyinfo.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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); |