[Bug 30644] Telepathy-glib fails to compile with sun studio c

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Oct 6 13:38:17 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=30644

Simon McVittie <simon.mcvittie at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|0.11                        |0.12
                URL|                            |http://git.collabora.co.uk/
                   |                            |?p=user/smcv/telepathy-glib
                   |                            |-smcv.git;a=shortlog;h=refs
                   |                            |/heads/012-pedantic
             Status|NEW                         |ASSIGNED
           Keywords|                            |patch
         AssignedTo|telepathy-bugs at lists.freede |simon.mcvittie at collabora.co
                   |sktop.org                   |.uk

--- Comment #1 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-10-06 04:38:17 PDT ---
(In reply to comment #0)
> "channel-manager.c", line 616: void function cannot return value
> cc: acomp failed for channel-manager.c

Fixed in a branch and awaiting code review for the next 0.12.x release, along
with some other low-hanging "gcc -std=c99 -pedantic" warnings.

I was curious about whether we could detect this automatically, so I tried
compiling telepathy-glib with "gcc -Werror -std=c99 -pedantic". It seems we
also rely on the following common extensions:

- passing a function pointer where a void* is expected or vice versa (GLib and
GIO rely heavily on this working, so there's nothing we can do about that)

- variadic macros that don't have any arguments corresponding to the "..."

- passing a Something* to a printf-style function that expects a void*

Changing any of these would make our code much less readable, so I don't
propose to change any of them; you may need to give your compiler a suitable
flag to make it allow them.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list