summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2009-07-20 20:55:11 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2009-07-20 20:55:11 +0000
commit561c135c3cb5eb06d44a32823cff8a32f8833d19 (patch)
treee09bc438db825ec38bcd58a54fda409f973cb001
parent279846ff58069c2ac686a94c08951577483b315c (diff)
gcc 2.95 build fixes.
-rw-r--r--dist/xcb-util/atom/atoms.gperf.m46
-rw-r--r--dist/xcb-util/icccm/icccm.c13
2 files changed, 13 insertions, 6 deletions
diff --git a/dist/xcb-util/atom/atoms.gperf.m4 b/dist/xcb-util/atom/atoms.gperf.m4
index d26814e9b..64d076a36 100644
--- a/dist/xcb-util/atom/atoms.gperf.m4
+++ b/dist/xcb-util/atom/atoms.gperf.m4
@@ -44,13 +44,15 @@ include(atomlist.m4)`'dnl
xcb_atom_t xcb_atom_get(xcb_connection_t *connection, const char *atom_name)
{
+ xcb_intern_atom_reply_t *reply;
+ xcb_atom_t atom;
if(atom_name == NULL)
return XCB_NONE;
- xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(connection,
+ reply = xcb_intern_atom_reply(connection,
xcb_intern_atom(connection, 0, strlen(atom_name), atom_name), NULL);
if(!reply)
return XCB_NONE;
- xcb_atom_t atom = reply->atom;
+ atom = reply->atom;
free(reply);
return atom;
}
diff --git a/dist/xcb-util/icccm/icccm.c b/dist/xcb-util/icccm/icccm.c
index 1c3de0d87..454e1ab35 100644
--- a/dist/xcb-util/icccm/icccm.c
+++ b/dist/xcb-util/icccm/icccm.c
@@ -241,13 +241,15 @@ uint8_t
xcb_get_wm_class_from_reply(xcb_get_wm_class_reply_t *prop,
xcb_get_property_reply_t *reply)
{
+ int name_len;
+
if(!reply || reply->type != STRING || reply->format != 8)
return 0;
prop->_reply = reply;
prop->instance_name = (char *) xcb_get_property_value(prop->_reply);
- int name_len = strlen(prop->instance_name);
+ name_len = strlen(prop->instance_name);
if(name_len == xcb_get_property_value_length(prop->_reply))
name_len--;
@@ -430,11 +432,12 @@ uint8_t
xcb_get_wm_size_hints_from_reply(xcb_size_hints_t *hints, xcb_get_property_reply_t *reply)
{
uint32_t flags;
+ int length;
if(!reply)
return 0;
- int length = xcb_get_property_value_length(reply) / (reply->format / 8);
+ length = xcb_get_property_value_length(reply) / (reply->format / 8);
if (!(reply->type == WM_SIZE_HINTS &&
(reply->format == 8 || reply->format == 16 ||
@@ -623,11 +626,13 @@ uint8_t
xcb_get_wm_hints_from_reply(xcb_wm_hints_t *hints,
xcb_get_property_reply_t *reply)
{
+ int length, num_elem;
+
if(!reply)
return 0;
- int length = xcb_get_property_value_length(reply);
- int num_elem = length / (reply->format / 8);
+ length = xcb_get_property_value_length(reply);
+ num_elem = length / (reply->format / 8);
if (reply->type != WM_HINTS
|| reply->format != 32