Make the globals static so they're initialized to zero.
authorSam Lantinga <slouken@libsdl.org>
Wed, 09 Mar 2011 14:47:37 -0800
changeset 5457e4ee8761f5cd
parent 5456 63258b963fc1
child 5458 a96fcc853bef
Make the globals static so they're initialized to zero.
test/testgesture.c
     1.1 --- a/test/testgesture.c	Wed Mar 09 14:46:09 2011 -0800
     1.2 +++ b/test/testgesture.c	Wed Mar 09 14:47:37 2011 -0800
     1.3 @@ -45,12 +45,12 @@
     1.4  
     1.5  #define VERBOSE SDL_FALSE
     1.6  
     1.7 -SDL_Window *window;
     1.8 -SDL_Event events[EVENT_BUF_SIZE];
     1.9 -int eventWrite;
    1.10 +static SDL_Window *window;
    1.11 +static SDL_Event events[EVENT_BUF_SIZE];
    1.12 +static int eventWrite;
    1.13  
    1.14  
    1.15 -int colors[7] = {0xFF,0xFF00,0xFF0000,0xFFFF00,0x00FFFF,0xFF00FF,0xFFFFFF};
    1.16 +static int colors[7] = {0xFF,0xFF00,0xFF0000,0xFFFF00,0x00FFFF,0xFF00FF,0xFFFFFF};
    1.17  
    1.18  typedef struct {
    1.19    float x,y;
    1.20 @@ -61,7 +61,7 @@
    1.21    Point p;
    1.22  } Knob;
    1.23  
    1.24 -Knob knob;
    1.25 +static Knob knob;
    1.26  
    1.27  void handler (int sig)
    1.28  {