Page 1 of 1

Help me fixing code

Posted: Mon Jul 13, 2009 10:01 am
by anubisg1
Hi, my name is Andrea Florio, actually working on openSUSE LXDE Team.
To build our packages we are of course using OpenSUSE Build Service
(OBS). OBS is also a debug tool, for both packages (spec and control
files) and code.

About the code i have some packages failing in code checks and exactly
(for detailed build log you can create an account on
http://build.opensuse.org and check failed packages int X11:lxde project) :

PCMANFM 0.5.1

... running 02-check-gcc-output
... testing for serious compiler warnings
(using /usr/lib/build/checks-data/check_gcc_output)
(using //.build.log)

I: A function uses a 'return;' statement, but has actually a value
to return, like an integer ('return 42;') or similar.
W: PCManFM voidreturn desktop/desktop-window.c:2176
W: PCManFM voidreturn main.c:302

I: Program returns random data in a function
E: PCManFM no-return-in-nonvoid-function pref-dialog.c:619


GPICVIEW 0.2.1 (no-return-in-nonvoid-function already fixed, patch
attached, i hope is a good fix, if not, i need your help than)

... running 02-check-gcc-output
... testing for serious compiler warnings
(using /usr/lib/build/checks-data/check_gcc_output)
(using //.build.log)

I: Program is using implicit definitions of special functions.
these functions need to use their correct prototypes to allow
the lightweight buffer overflow checking to work.
- Implicit memory/string functions need #include <string.h>.
- Implicit *printf functions need #include <stdio.h>.
- Implicit *printf functions need #include <stdio.h>.
- Implicit *read* functions need #include <unistd.h>.
- Implicit *recv* functions need #include <sys/socket.h>.
E: gpicview implicit-fortify-decl jpeg-tran.c:215


LXLAUNCHER 0.2.1

... testing for serious compiler warnings
(using /usr/lib/build/checks-data/check_gcc_output)
(using //.build.log)

I: Program returns random data in a function
E: lxlauncher no-return-in-nonvoid-function lxlauncher.c:314, 677


LXMUSIC 0.3.0

... running 02-check-gcc-output
... testing for serious compiler warnings
(using /usr/lib/build/checks-data/check_gcc_output)
(using //.build.log)

I: A function uses a 'return;' statement, but has actually a value
to return, like an integer ('return 42;') or similar.
W: lxmusic voidreturn lxmusic.c:1333, 1910

I: Program returns random data in a function
E: lxmusic no-return-in-nonvoid-function lxmusic.c:1467, 605

LXTASK 0.1.1

... running 02-check-gcc-output
... testing for serious compiler warnings
(using /usr/lib/build/checks-data/check_gcc_output)
(using //.build.log)

I: Function call needs to pass NULL-pointer as last argument
E: lxtask missing-sentinel main.c:66

LXTERMINAL 0.1.6

... running 02-check-gcc-output
... testing for serious compiler warnings
(using /usr/lib/build/checks-data/check_gcc_output)
(using /var/tmp/build-root/.build.log)

I: Program returns random data in a function
E: lxterminal no-return-in-nonvoid-function tab.c:54


LXNM and LXPANEL are not here reported because i used a 60 days old
code, so i have to upgrade to newest first but both report some 64bit
portability issues


Thanks for help
Regards
Andrea


Code: Select all

diff -ur gpicview-0.1.11.old//src/main-win.c gpicview-0.1.11/src/main-win.c
--- gpicview-0.1.11.old//src/main-win.c	2008-12-16 15:51:33.000000000 +0100
+++ gpicview-0.1.11/src/main-win.c	2009-03-12 08:25:50.704021741 +0100
@@ -694,7 +694,7 @@
     else if(i == -45)	return 7;
     else if(i == -90)	return 2;
     else if(i == -135)	return 5;
-    else if(i == -180)	return 4;
+    else return 4;
 }
 
 static int get_new_angle( int orig_angle, int rotate_angle )