Browse Source

more warnings

Thomas Buck 11 years ago
parent
commit
b16ee812e3
4 changed files with 5 additions and 5 deletions
  1. 0
    1
      include/TombRaider.h
  2. 3
    2
      src/Network.cpp
  3. 1
    1
      src/OpenRaider.cpp
  4. 1
    1
      src/Texture.cpp

+ 0
- 1
include/TombRaider.h View File

136
 
136
 
137
 #define TR_SOUND_FOOTSTEP0    1
137
 #define TR_SOUND_FOOTSTEP0    1
138
 #define TR_SOUND_F_PISTOL    12
138
 #define TR_SOUND_F_PISTOL    12
139
-#define TR_SOUND_F_PISTOL    12
140
 
139
 
141
 enum TR4_Objects
140
 enum TR4_Objects
142
 {
141
 {

+ 3
- 2
src/Network.cpp View File

547
     }
547
     }
548
 
548
 
549
     // Setup connection
549
     // Setup connection
550
-    bzero((char*) &dest, sizeof(dest));
550
+    memset(&dest, 0, sizeof(dest));
551
     dest.sin_family = AF_INET;
551
     dest.sin_family = AF_INET;
552
     int port = getPort();
552
     int port = getPort();
553
     dest.sin_port = htons(port);
553
     dest.sin_port = htons(port);
603
 
603
 
604
             if (!f.data.send)
604
             if (!f.data.send)
605
             {
605
             {
606
-                usleep(20);
606
+                const struct timespec tmp = {.tv_sec = 0, .tv_nsec = 20000};
607
+                nanosleep(&tmp, NULL);
607
                 continue;
608
                 continue;
608
             }
609
             }
609
         }
610
         }

+ 1
- 1
src/OpenRaider.cpp View File

1014
 
1014
 
1015
         mSound.addWave(riff, riffSz, &id, mSound.SoundFlagsNone);
1015
         mSound.addWave(riff, riffSz, &id, mSound.SoundFlagsNone);
1016
 
1016
 
1017
-        if (id == TR_SOUND_F_PISTOL && id > 0)
1017
+        if (((i + 1) == TR_SOUND_F_PISTOL) && (id > 0))
1018
         {
1018
         {
1019
             m_testSFX = id;
1019
             m_testSFX = id;
1020
         }
1020
         }

+ 1
- 1
src/Texture.cpp View File

396
     sdlColor.g = color[1];
396
     sdlColor.g = color[1];
397
     sdlColor.b = color[2];
397
     sdlColor.b = color[2];
398
 
398
 
399
-    if (!mFlags & fUseSDL_TTF)
399
+    if (!(mFlags & fUseSDL_TTF))
400
     {
400
     {
401
         printf("SDL_TTF couldn't be used... exiting\n");
401
         printf("SDL_TTF couldn't be used... exiting\n");
402
         return NULL;
402
         return NULL;

Loading…
Cancel
Save