mirror of
https://github.com/qpdf/qpdf.git
synced 2025-02-02 11:58:25 +00:00
Protect gcc diagnostic pragmas with gcc version
Versions prior to 4.6 didn't allow gcc diagnostic pragmas with push and pop and to appear anywhere in the file. Just let the warning be there for those versions.
This commit is contained in:
parent
e8ddac8950
commit
8e636ea680
@ -77,8 +77,10 @@ Pl_Flate::handleData(unsigned char* data, int len, int flush)
|
||||
// deflateInit and inflateInit are macros that use old-style
|
||||
// casts.
|
||||
#ifdef __GNUC__
|
||||
# if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
# endif
|
||||
#endif
|
||||
if (this->action == a_deflate)
|
||||
{
|
||||
@ -89,7 +91,9 @@ Pl_Flate::handleData(unsigned char* data, int len, int flush)
|
||||
err = inflateInit(&zstream);
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
# if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406
|
||||
# pragma GCC diagnostic pop
|
||||
# endif
|
||||
#endif
|
||||
|
||||
checkError("Init", err);
|
||||
|
Loading…
x
Reference in New Issue
Block a user