ReadPage() must've been returning int at some point. It is returning FPXStatus for, at least, 5 years now, but gcc never warned about us checking invalid values. Thanks to clang for finding this redundancy. --- fpx/fpxlib.cpp 2007-11-02 03:10:05.000000000 -0400 +++ fpx/fpxlib.cpp 2012-10-04 22:49:40.000000000 -0400 @@ -825,5 +825,5 @@ FPXImageDesc* renderingBuffer) { - FPXStatus status = FPX_OK; + FPXStatus status; if (!thePage) status = FPX_INVALID_FPX_HANDLE; @@ -839,18 +839,7 @@ else { GtheSystemToolkit->SetUsedColorSpace(image.GetBaselineColorSpace()); - switch (thePage->ReadPage (image.Get32BitsBuffer())) { - case -2 : - status = FPX_FILE_READ_ERROR; - break; - case -3 : - status = FPX_LOW_MEMORY_ERROR; - break; - case 0: - image.UpdateDescriptor(); - break; - default: - { - } - } + status = thePage->ReadPage(image.Get32BitsBuffer()); + if (status == FPX_OK) + image.UpdateDescriptor(); } } @@ -863,5 +852,5 @@ FPXImageDesc* renderingBuffer) { - FPXStatus status = FPX_OK; + FPXStatus status; if (!thePage) status = FPX_INVALID_FPX_HANDLE; @@ -877,18 +866,7 @@ else { GtheSystemToolkit->SetUsedColorSpace(line.GetBaselineColorSpace()); - switch (thePage->ReadPageLine (lineNumber, line.Get32BitsBuffer())) { - case -2 : - status = FPX_FILE_READ_ERROR; - break; - case -3 : - status = FPX_LOW_MEMORY_ERROR; - break; - case 0: - line.UpdateDescriptor(); - break; - default: - { - } - } + status = thePage->ReadPageLine (lineNumber, line.Get32BitsBuffer()); + if (status == FPX_OK) + line.UpdateDescriptor(); } }