- Add return-in-nonvoid.diff to fix rpmlint aborting due to bad code. [boo#1115061] OBS-URL: https://build.opensuse.org/request/show/647045 OBS-URL: https://build.opensuse.org/package/show/games/sdl-asylum?expand=0&rev=5
57 lines
1.7 KiB
Diff
57 lines
1.7 KiB
Diff
From: Jan Engelhardt <jengelh@inai.de>
|
|
2018-11-07 17:07:37.291493768 +0100
|
|
|
|
Fix a few things that upset rpmlint (which then failed the build).
|
|
|
|
file.c: In function 'int swi_osfile(int, const char*, char*, char*)':
|
|
file.c:350:1: warning: control reaches end of non-void function [-Wreturn-type]
|
|
keyboard.c: In function 'int swi_joystick_read(int, int*, int*)':
|
|
keyboard.c:92:1: warning: no return statement in function returning non-void [-Wreturn-type]
|
|
sound.c: In function 'int swi_sound_speaker(int)':
|
|
sound.c:397:1: warning: no return statement in function returning non-void [-Wreturn-type]
|
|
|
|
---
|
|
file.c | 1 +
|
|
keyboard.c | 2 +-
|
|
sound.c | 2 +-
|
|
3 files changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
Index: asylum-0.3.2/file.c
|
|
===================================================================
|
|
--- asylum-0.3.2.orig/file.c
|
|
+++ asylum-0.3.2/file.c
|
|
@@ -347,6 +347,7 @@ int swi_osfile(int op, const char* name,
|
|
fclose(f);
|
|
return 0;
|
|
}
|
|
+ return 0;
|
|
}
|
|
|
|
int swi_blitz_hammerop(int op, char* name, char* path, char* space)
|
|
Index: asylum-0.3.2/keyboard.c
|
|
===================================================================
|
|
--- asylum-0.3.2.orig/keyboard.c
|
|
+++ asylum-0.3.2/keyboard.c
|
|
@@ -88,7 +88,7 @@ char swi_oscrc(int w, char* start, char*
|
|
|
|
int swi_joystick_read(int a, int* x, int* y)
|
|
{
|
|
- ;
|
|
+ return 0;
|
|
}
|
|
|
|
void update_keyboard()
|
|
Index: asylum-0.3.2/sound.c
|
|
===================================================================
|
|
--- asylum-0.3.2.orig/sound.c
|
|
+++ asylum-0.3.2/sound.c
|
|
@@ -393,7 +393,7 @@ void swi_sound_control(int c, int a, int
|
|
}
|
|
int swi_sound_speaker(int s)
|
|
{
|
|
- ;
|
|
+ return 0;
|
|
}
|
|
void swi_stasis_link(int a, int b)
|
|
{
|