summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Triplett <josh@freedesktop.org>2006-04-28 12:18:39 -0700
committerJosh Triplett <josh@freedesktop.org>2006-04-28 12:18:39 -0700
commit316d55cd15a5fde929435a0e92c48d5f7655a94e (patch)
tree6eb6f96033892821144476125d54c59d1ade2262
parent1c14f1ba1706dcce80d9355e43888a00b4b8c777 (diff)
Fix more format string integer size warnings.
-rw-r--r--hypnomoire.c4
-rw-r--r--rendertest.c16
-rw-r--r--reply_formats.c4
-rw-r--r--xcbrandr.c2
-rw-r--r--xcbxvinfo.c14
5 files changed, 20 insertions, 20 deletions
diff --git a/hypnomoire.c b/hypnomoire.c
index ffd4a5e..b9746a2 100644
--- a/hypnomoire.c
+++ b/hypnomoire.c
@@ -50,8 +50,8 @@ static void get_depth()
}
depth = geom->depth;
- fprintf(stderr, "Root 0x%lx: %dx%dx%d\n",
- root->root.xid, geom->width, geom->height, geom->depth);
+ fprintf(stderr, "Root 0x%x: %dx%dx%d\n",
+ root->root.xid, geom->width, geom->height, geom->depth);
free(geom);
}
diff --git a/rendertest.c b/rendertest.c
index 1daf5a7..d738288 100644
--- a/rendertest.c
+++ b/rendertest.c
@@ -26,7 +26,7 @@ XCBRenderFIXED make_fixed(INT16 i, INT16 f)
void print_version_info(XCBRenderQueryVersionRep *reply)
{
- fprintf(stdout, "Render Version: %ld.%ld\n", reply->major_version,
+ fprintf(stdout, "Render Version: %d.%d\n", reply->major_version,
reply->minor_version);
}
@@ -53,7 +53,7 @@ int print_formats_info(XCBRenderQueryPictFormatsRep *reply)
XCBRenderPICTFORMINFO *forminfo = (XCBRenderPICTFORMINFO *)forminfo_iter.data;
fprintf(stdout, "PICTFORMINFO #%d\n", 1 + num_formats - forminfo_iter.rem);
- fprintf(stdout, " PICTFORMAT ID: %ld\n", forminfo->id.xid);
+ fprintf(stdout, " PICTFORMAT ID: %d\n", forminfo->id.xid);
fprintf(stdout, " PICTFORMAT Type: %d\n", forminfo->type);
fprintf(stdout, " PICTFORMAT Depth: %d\n", forminfo->depth);
fprintf(stdout, " Direct RedShift: %d\n", forminfo->direct.red_shift);
@@ -75,8 +75,8 @@ int print_formats_info(XCBRenderQueryPictFormatsRep *reply)
XCBRenderPICTSCREEN *cscreen = screen_iter.data;
fprintf(stdout, "Screen #%d\n", 1 + num_screens - screen_iter.rem);
- fprintf(stdout, " Depths for this screen: %ld\n", cscreen->num_depths);
- fprintf(stdout, " Fallback PICTFORMAT: %ld\n", cscreen->fallback.xid);
+ fprintf(stdout, " Depths for this screen: %d\n", cscreen->num_depths);
+ fprintf(stdout, " Fallback PICTFORMAT: %d\n", cscreen->fallback.xid);
depth_iter = XCBRenderPICTSCREENDepthsIter(cscreen);
num_depths = cscreen->num_depths;
@@ -96,8 +96,8 @@ int print_formats_info(XCBRenderQueryPictFormatsRep *reply)
XCBRenderPICTVISUAL *cvisual = visual_iter.data;
fprintf(stdout, " Visual #%d\n", 1 + num_visuals - visual_iter.rem);
- fprintf(stdout, " VISUALID: %ld\n", cvisual->visual.id);
- fprintf(stdout, " PICTFORMAT: %ld\n", cvisual->format.xid);
+ fprintf(stdout, " VISUALID: %d\n", cvisual->visual.id);
+ fprintf(stdout, " PICTFORMAT: %d\n", cvisual->format.xid);
XCBRenderPICTVISUALNext(&visual_iter);
}
XCBRenderPICTDEPTHNext(&depth_iter);
@@ -542,10 +542,10 @@ int main(int argc, char *argv[])
forminfo_query.direct.alpha_mask = 255;
forminfo_result = get_pictforminfo(formats_reply, &forminfo_query);
- fprintf(stdout, "\n***** found PICTFORMAT: %ld *****\n",
+ fprintf(stdout, "\n***** found PICTFORMAT: %d *****\n",
forminfo_result->id.xid);
rootformat = get_pictformat_from_visual(formats_reply, root->root_visual);
- fprintf(stdout, "\n***** found root PICTFORMAT: %ld *****\n", rootformat.xid);
+ fprintf(stdout, "\n***** found root PICTFORMAT: %d *****\n", rootformat.xid);
#if 0
draw_window(c, formats_reply);
diff --git a/reply_formats.c b/reply_formats.c
index 7920f3f..bb25108 100644
--- a/reply_formats.c
+++ b/reply_formats.c
@@ -24,8 +24,8 @@ int formatGetWindowAttributesReply(XCBWINDOW wid, XCBGetWindowAttributesRep *rep
" class = %d\n"
" bitGravity = %d\n"
" winGravity = %d\n"
- " backingBitPlanes = 0x%08lx\n"
- " backingPixel = %ld\n"
+ " backingBitPlanes = 0x%08x\n"
+ " backingPixel = %d\n"
" saveUnder = %d\n"
" mapInstalled = %d\n"
" mapState = %d\n"
diff --git a/xcbrandr.c b/xcbrandr.c
index 17aab3f..f3d84e2 100644
--- a/xcbrandr.c
+++ b/xcbrandr.c
@@ -417,7 +417,7 @@ main (int argc, char **argv)
printf(" window = %d\n root = %d\n size_index = %d\n rotation %d\n",
(int) sce->request_window.xid, (int) sce->root.xid,
sce->sizeID, sce->rotation);
- printf(" timestamp = %ld, config_timestamp = %ld\n",
+ printf(" timestamp = %d, config_timestamp = %d\n",
sce->timestamp, sce->config_timestamp);
printf(" Rotation = %x\n", sce->rotation);
printf(" %d X %d pixels, %d X %d mm\n",
diff --git a/xcbxvinfo.c b/xcbxvinfo.c
index 0f9a363..3285cea 100644
--- a/xcbxvinfo.c
+++ b/xcbxvinfo.c
@@ -113,7 +113,7 @@ int main(int argc, char *argv[])
name = ExtractString(XCBXvAdaptorInfoName(ainfo), XCBXvAdaptorInfoNameLength(ainfo));
fprintf(stdout, " Adaptor #%i: \"%s\"\n", j, name);
fprintf(stdout, " number of ports: %i\n", ainfo->num_ports);
- fprintf(stdout, " port base: %li\n", ainfo->base_id.xid);
+ fprintf(stdout, " port base: %i\n", ainfo->base_id.xid);
fprintf(stdout, " operations supported: ");
free(name);
@@ -142,7 +142,7 @@ int main(int argc, char *argv[])
fprintf(stdout, " supported visuals:\n");
for (k=0; k < ainfo->num_formats; k++, format++)
- fprintf(stdout, " depth %i, visualID 0x%2lx\n",
+ fprintf(stdout, " depth %i, visualID 0x%2x\n",
format->depth, format->visual.id);
attr_rep = XCBXvQueryPortAttributesReply(c,
@@ -155,7 +155,7 @@ int main(int argc, char *argv[])
for (k = 0; k < nattr; k++) {
attribute = attr_iter.data;
- fprintf(stdout, " \"%s\" (range %li to %li)\n",
+ fprintf(stdout, " \"%s\" (range %i to %i)\n",
XCBXvAttributeInfoName(attribute),
attribute->min,
attribute->max);
@@ -183,7 +183,7 @@ int main(int argc, char *argv[])
XCBXvGetPortAttributeReply(c,
XCBXvGetPortAttribute(c, ainfo->base_id, the_atom),
NULL);
- if (pattr_rep) fprintf(stdout, " (current value is %li)", pattr_rep->value);
+ if (pattr_rep) fprintf(stdout, " (current value is %i)", pattr_rep->value);
free(pattr_rep);
}
fprintf(stdout, "\n");
@@ -224,7 +224,7 @@ int main(int argc, char *argv[])
name = ExtractString(XCBXvEncodingInfoName(encoding), XCBXvEncodingInfoNameLength(encoding));
if(nstrcmp(name, strlen(name), "XV_IMAGE")) {
fprintf(stdout,
- " encoding ID #%li: \"%*s\"\n",
+ " encoding ID #%i: \"%*s\"\n",
encoding->encoding.xid,
strlen(name),
name);
@@ -268,7 +268,7 @@ int main(int argc, char *argv[])
for(n = 0; n < numImages; n++) {
format = formats_iter.data;
memcpy(imageName, &(format->id), 4);
- fprintf(stdout, " id: 0x%lx", format->id);
+ fprintf(stdout, " id: 0x%x", format->id);
if(isprint(imageName[0]) && isprint(imageName[1]) &&
isprint(imageName[2]) && isprint(imageName[3]))
{
@@ -323,7 +323,7 @@ int main(int argc, char *argv[])
format->depth);
fprintf(stdout, " red, green, blue masks: "
- "0x%lx, 0x%lx, 0x%lx\n",
+ "0x%x, 0x%x, 0x%x\n",
format->red_mask,
format->green_mask,
format->blue_mask);