Bug 59434 - build root check failures: nonvoid return and no-return-in nonvoid
Summary: build root check failures: nonvoid return and no-return-in nonvoid
Status: RESOLVED FIXED
Alias: None
Product: at-spi2
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Rob Taylor
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-15 19:54 UTC by Dominique Leuenberger
Modified: 2013-01-16 10:49 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Dominique Leuenberger 2013-01-15 19:54:25 UTC
While building at-spi2-core-2.7.4.1, the OBS (open Build Service) Build Root Policy verification barks about:

[  123s] I: A function uses a 'return;' statement, but has actually a value
[  123s]    to return, like an integer ('return 42;') or similar.
[  123s] W: at-spi2-core voidreturn atspi-misc.c:360
[  123s] 
[  123s] I: Program returns random data in a function
[  123s] E: at-spi2-core no-return-in-nonvoid-function memory.c:78
[  123s] 
[  123s] I: Program returns random data in a function
[  123s] E: at-spi2-core no-return-in-nonvoid-function memory.c:78


for atspi-misc, the code indeed just has a 'return' statement... which is undefined in this situation.

The fix for memory.c is as trivial as:
diff --git a/test/memory.c b/test/memory.c
index 28c3a8e..3b02959 100644
--- a/test/memory.c
+++ b/test/memory.c
@@ -65,6 +65,7 @@ on_event (AtspiEvent *event, void *data)
   g_boxed_free (ATSPI_TYPE_EVENT, event);
 }
 
+void
 main()
 {
   atspi_init ();
Comment 1 Mike Gorse 2013-01-16 10:49:50 UTC
This should be fixed with commit 57e6827. Thanks.


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.