Make the globals static so they're initialized to zero.
authorSam Lantinga <slouken@libsdl.org>
Wed, 09 Mar 2011 14:47:37 -0800
changeset 5457 e4ee8761f5cd
parent 5456 63258b963fc1
child 5458 a96fcc853bef
Make the globals static so they're initialized to zero.
test/testgesture.c
--- a/test/testgesture.c	Wed Mar 09 14:46:09 2011 -0800
+++ b/test/testgesture.c	Wed Mar 09 14:47:37 2011 -0800
@@ -45,12 +45,12 @@
 
 #define VERBOSE SDL_FALSE
 
-SDL_Window *window;
-SDL_Event events[EVENT_BUF_SIZE];
-int eventWrite;
+static SDL_Window *window;
+static SDL_Event events[EVENT_BUF_SIZE];
+static int eventWrite;
 
 
-int colors[7] = {0xFF,0xFF00,0xFF0000,0xFFFF00,0x00FFFF,0xFF00FF,0xFFFFFF};
+static int colors[7] = {0xFF,0xFF00,0xFF0000,0xFFFF00,0x00FFFF,0xFF00FF,0xFFFFFF};
 
 typedef struct {
   float x,y;
@@ -61,7 +61,7 @@
   Point p;
 } Knob;
 
-Knob knob;
+static Knob knob;
 
 void handler (int sig)
 {