fix a gcc warning with clang pragmas

This commit is contained in:
John Cupitt 2022-02-22 10:06:43 +00:00
parent b05515b0c5
commit c5f2fea8bf
2 changed files with 10 additions and 4 deletions

View File

@ -86,9 +86,13 @@ Check the output of `meson setup` carefully and make sure it found everything
you wanted it to find. Add arguments to `meson setup` to change the build
configuration.
- Add flags like `-Dnsgif=false` to turn options on and off, see
- Add flags like `-Dnsgif=false` to turn libvips options on and off, see
`meson_options.txt` for a list of all the build options libvips supports.
- Add flags like `-Dmagick=disable` to turn libvips dependencies on and off,
see `meson_options.txt` and the list below for a summary of all the libvips
dependencies.
- Meson will do a debug build by default. Add `--buildtype=release` for a
release (optimised) build.

View File

@ -1785,8 +1785,10 @@ vips_composite2( VipsImage *base, VipsImage *overlay, VipsImage **out,
va_list ap;
int result;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wvarargs"
/* Works for gcc and clang.
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wvarargs"
/* Triggers a clang compiler warning because mode might not be an int.
* I think the warning is harmless for all platforms we care about.
@ -1795,7 +1797,7 @@ vips_composite2( VipsImage *base, VipsImage *overlay, VipsImage **out,
g_assert( sizeof( mode ) == sizeof( int ) );
#pragma clang diagnostic pop
#pragma GCC diagnostic pop
result = vips_call_split( "composite2", ap, base, overlay, out, mode );
va_end( ap );