[cups.bugs] [MOD] STR #2327: cups 1.2.11 compile warnings on RH AS 4

Thomas Lohman thomasl at mtl.mit.edu
Thu Apr 5 06:02:27 PDT 2007


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

I get 3 compile warnings in subscriptions.c regarding dbus and mismatches
on parameter types expected when compiling the latest cups 1.2 release
from the subversion repository.  These errors also happened with 1.2.10.

Here is the output:

subscriptions.c: In function `cupsd_send_dbus':
subscriptions.c:1365: warning: passing arg 2 of
`dbus_message_iter_append_string' from incompatible pointer type
subscriptions.c:1369: warning: passing arg 2 of
`dbus_message_iter_append_uint32' makes integer from pointer without a
cast
subscriptions.c:1370: warning: passing arg 2 of
`dbus_message_iter_append_string' from incompatible pointer type

It looks to be because RH AS 4 comes with an older version of dbus.
My system has the following dbus packages from Redhat installed:

dbus-devel-0.22-12.EL.8
dbus-0.22-12.EL.8

In looking at the dbus include files, it appears that a const char * is
expected for dbus_message_iter_append_string and an unsigned int for
dbus_message_iter_append_uint32.  In subscriptions.c, it appears that an
address pointing to the value is being passed as opposed to the value
itself.

It looks like in newer versions of dbus, these functions have been
replaced by a "wrapper" function that takes a value type and then a
pointer to the value.  I verified this by compiling the latest dbus source
and compiling/linking cups against this version instead of the RH AS 4
version and the errors went away.

Based on all of this, I've attached a patch (in svn diff format) to
subscriptions.c that seems to have fixed this problem.

thanks much,


--tom

Link: http://www.cups.org/str.php?L2327
Version: 1.2-current
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: subscriptions.c.diff
URL: <http://lists.cups.org/pipermail/cups-devel/attachments/20070405/5a3a1596/attachment.ksh>


More information about the cups-devel mailing list