1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
From: Markus Koschany <apo@debian.org>
Date: Wed, 13 Sep 2017 06:53:50 +0200
Subject: implicit declaration
Fix various compiler warnings.
---
demo.c | 1 +
misc.c | 1 +
room.c | 1 +
xball.c | 3 ++-
xball_sys.c | 1 +
5 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/demo.c b/demo.c
index 0091a05..cf6dd73 100644
--- a/demo.c
+++ b/demo.c
@@ -23,6 +23,7 @@
#include "names.h"
#include "intf.h"
#include "miscx.h"
+#include <stdlib.h>
/* Structures */
typedef struct {
diff --git a/misc.c b/misc.c
index 996f15e..c979377 100644
--- a/misc.c
+++ b/misc.c
@@ -12,6 +12,7 @@
/* System Headers */
#include <malloc.h>
#include <string.h>
+#include <stdlib.h>
/* Given a string 'text\nmore text', allocates and returns the
diff --git a/room.c b/room.c
index bd007c6..92aed64 100644
--- a/room.c
+++ b/room.c
@@ -27,6 +27,7 @@
/* Local headers */
#include "room.h"
#include "misc.h"
+#include "miscx.h"
#include "scrollbar.h"
/* Macros */
diff --git a/xball.c b/xball.c
index 40d0aca..24cd1b7 100644
--- a/xball.c
+++ b/xball.c
@@ -23,6 +23,7 @@
#include "xball_sys.h"
#include "miscx.h"
#include "patchlevel.h"
+#include <stdlib.h>
/*** Start of main program ***/
int
@@ -56,7 +57,7 @@ char **argv;
if (argc > 1 && strncmp(argv[1],"-help", strlen(argv[1])) == 0)
{
- printf("XBall - version %d, patchlevel %d.\n\n", VERSION, PATCHLEVEL);
+ printf("XBall - version %s, patchlevel %d.\n\n", VERSION, PATCHLEVEL);
puts("Usage:\n\txball [-options ...]\n\nWhere options include:");
puts(" Option Default Resource Meaning");
puts(" -help Print out this message");
diff --git a/xball_sys.c b/xball_sys.c
index ee2e4a4..d14ba66 100644
--- a/xball_sys.c
+++ b/xball_sys.c
@@ -26,6 +26,7 @@
#include "xball_sys.h"
#include "names.h"
#include "misc.h"
+#include <stdlib.h>
/* Creates the xball system. This object holds together the other
|