push/pop was introduced for GCC4.6 only - so avoid it.
Also, properly fix the fgets warning.
#ifdef __GNUC__
// Avoid "_center not initialized" warnings.
-# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wuninitialized"
#endif
#ifdef __GNUC__
// Restore warning settings.
-# pragma GCC diagnostic pop
+# pragma GCC diagnostic warning "-Wuninitialized"
#endif
const SGVec3<T>& getCenter() const
#ifdef __GNUC__
// Avoid "_data not initialized" warnings (see comment below).
-# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wuninitialized"
#endif
#ifdef __GNUC__
// Restore warning settings.
-# pragma GCC diagnostic pop
+# pragma GCC diagnostic warning "-Wuninitialized"
#endif
/// Constructor. Initialize by the given values
errno = 0;
while (1) {
- (void) fgets(buffer, 256, infile);
+ if (0 == fgets(buffer, 256, infile))
+ break;
if (feof(infile)) {
break;
}