By the draft C99 standart section 6.7.8 paragraph 10:
    an object that has static storage duration is not initialized explicitly, then:
	— if it has pointer type, it is initialized to a null pointer;
This commit is contained in:
Volodymyr Patuta 2021-01-01 20:39:27 +01:00
parent c094eb0514
commit fd43567b3c
1 changed files with 4 additions and 11 deletions

View File

@ -39,19 +39,12 @@ static int get_sign(float x, float y);
static uint _screenId = 0; static uint _screenId = 0;
// surface representing the Sun. // surface representing the Sun.
static surface_t * _sun = NULL; static surface_t * _sun;
// surface array representing 8 planets + pluto (dwarf planet). // surface array representing 8 planets + pluto (dwarf planet).
static surface_t * _planet[9] = { NULL, NULL, NULL, static surface_t * _planet[9];
NULL, NULL, NULL,
NULL, NULL, NULL };
// surface array representing 18 moons of the planets. // surface array representing 18 moons of the planets.
static surface_t * _moon[18] = {NULL, NULL, NULL, NULL, static surface_t * _moon[18];
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL};
/* des variable d'états pour activer/désactiver des options de rendu */ /* des variable d'états pour activer/désactiver des options de rendu */
static int _use_tex = 1, _use_color = 0, _use_lighting = 1; static int _use_tex = 1, _use_color = 0, _use_lighting = 1;
@ -82,7 +75,7 @@ static float _s = 1.0f; // multiplier for angle (for speeding planets movement a
static float _a = 0.0f; // rotation angle. static float _a = 0.0f; // rotation angle.
static float _r = 0.0f; // -//- static float _r = 0.0f; // -//-
static Mix_Chunk * bsound = NULL; // background sound. static Mix_Chunk * bsound; // background sound.
/*!\brief paramètre l'application et lance la boucle infinie. */ /*!\brief paramètre l'application et lance la boucle infinie. */
int main(int argc, char ** argv) { int main(int argc, char ** argv) {