Bug 30447 - Some 'void' functions return a value
Summary: Some 'void' functions return a value
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: mission-control (show other bugs)
Version: 5.6
Hardware: All Solaris
: medium major
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 00:40 UTC by Jeff Cai
Modified: 2010-09-29 03:04 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Not return values for the 'void' functions (1.22 KB, patch)
2010-09-29 01:15 UTC, Jeff Cai
Details | Splinter Review

Description Jeff Cai 2010-09-29 00:40:34 UTC
In telepathy-mission-control 5.6.0, some void functions return a value. Solaris CC looks this as a building error.
Comment 1 Jeff Cai 2010-09-29 01:15:47 UTC
Created attachment 39037 [details] [review]
Not return values for the 'void' functions
Comment 2 Simon McVittie 2010-09-29 03:04:22 UTC
Fixed in git by applying your patch; it'll be in 5.6.1 and 5.7.0. Thanks!

Solaris CC is behaving according to ISO C99, but unfortunately gcc seems to allow returning a void expression from a void function (presumably as an extension), and it doesn't seem to have an option to warn about this.

If you send more patches in future, it'd be ideal if you could either format them with git format-patch or point us to a git repository we can pull from, so we can credit you appropriately without inventing a commit message.

> --- a/src/mcd-manager.c
> +++ b/src/mcd-manager.c
> @@ -35,7 +35,6 @@
>   * FIXME
>   */
>  
> -#define _POSIX_C_SOURCE 200112L  /* for strtok_r() */

This isn't really part of the fix for this bug (as far as I can see), but we don't call strtok_r any more anyway, so I applied it as a separate patch.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.