Alas. Fix #pragma magic for GCC <= 4.5.
push/pop was introduced for GCC4.6 only - so avoid it. Also, properly fix the fgets warning.
This commit is contained in:
parent
49a23fdc2e
commit
423eba3733
@ -25,7 +25,6 @@ public:
|
|||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
// Avoid "_center not initialized" warnings.
|
// Avoid "_center not initialized" warnings.
|
||||||
# pragma GCC diagnostic push
|
|
||||||
# pragma GCC diagnostic ignored "-Wuninitialized"
|
# pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -49,7 +48,7 @@ public:
|
|||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
// Restore warning settings.
|
// Restore warning settings.
|
||||||
# pragma GCC diagnostic pop
|
# pragma GCC diagnostic warning "-Wuninitialized"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const SGVec3<T>& getCenter() const
|
const SGVec3<T>& getCenter() const
|
||||||
|
@ -31,7 +31,6 @@ public:
|
|||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
// Avoid "_data not initialized" warnings (see comment below).
|
// Avoid "_data not initialized" warnings (see comment below).
|
||||||
# pragma GCC diagnostic push
|
|
||||||
# pragma GCC diagnostic ignored "-Wuninitialized"
|
# pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -50,7 +49,7 @@ public:
|
|||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
// Restore warning settings.
|
// Restore warning settings.
|
||||||
# pragma GCC diagnostic pop
|
# pragma GCC diagnostic warning "-Wuninitialized"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// Constructor. Initialize by the given values
|
/// Constructor. Initialize by the given values
|
||||||
|
@ -143,7 +143,8 @@ SGTimeZoneContainer::SGTimeZoneContainer(const char *filename)
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
(void) fgets(buffer, 256, infile);
|
if (0 == fgets(buffer, 256, infile))
|
||||||
|
break;
|
||||||
if (feof(infile)) {
|
if (feof(infile)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user