]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/vis.c
Merge branch 'divVerent/MAX_MAP_DRAW_INDEXES'
[xonotic/netradiant.git] / tools / quake3 / q3map2 / vis.c
index 0bc8313f0d7113a8d27e54a2105b8333727cd546..b92919226af604a9089019940bcb33f8410c3a5c 100644 (file)
@@ -102,9 +102,9 @@ the earlier information.
 */
 int PComp (const void *a, const void *b)
 {
-       if ( (*(vportal_t **)a)->nummightsee == (*(vportal_t **)b)->nummightsee)
+       if ( (*(const vportal_t *const *)a)->nummightsee == (*(const vportal_t *const *)b)->nummightsee)
                return 0;
-       if ( (*(vportal_t **)a)->nummightsee < (*(vportal_t **)b)->nummightsee)
+       if ( (*(const vportal_t *const *)a)->nummightsee < (*(const vportal_t *const *)b)->nummightsee)
                return -1;
        return 1;
 }
@@ -932,8 +932,8 @@ void LoadPortals (char *name)
                        Error ("LoadPortals: reading portal %i", i);
                if (numpoints > MAX_POINTS_ON_WINDING)
                        Error ("LoadPortals: portal %i has too many points", i);
-               if ( (unsigned)leafnums[0] > portalclusters
-               || (unsigned)leafnums[1] > portalclusters)
+               if (leafnums[0] > portalclusters
+               || leafnums[1] > portalclusters)
                        Error ("LoadPortals: reading portal %i", i);
                if (fscanf (f, "%i ", &hint) != 1)
                        Error ("LoadPortals: reading hint state");
@@ -954,7 +954,10 @@ void LoadPortals (char *name)
                        for (k=0 ; k<3 ; k++)
                                w->points[j][k] = v[k];
                }
-               fscanf (f, "\n");
+               if(fscanf (f, "\n") != 0)
+               {
+                       // silence gcc warning
+               }
                
                // calc plane
                PlaneFromWinding (w, &plane);
@@ -1025,7 +1028,10 @@ void LoadPortals (char *name)
                        for (k=0 ; k<3 ; k++)
                                w->points[j][k] = v[k];
                }
-               fscanf (f, "\n");
+               if(fscanf (f, "\n") != 0)
+               {
+                       // silence gcc warning
+               }
                
                // calc plane
                PlaneFromWinding (w, &plane);