Image: silence compiler warnings

This commit is contained in:
李通洲
2024-01-15 09:13:14 +08:00
parent 974ee2ab0d
commit afa0a7dac8
4 changed files with 16 additions and 9 deletions
+1 -2
View File
@@ -1,10 +1,9 @@
#ifdef FF_HAVE_IMAGEMAGICK6
#include "image.h"
#include "magickcore_wrapper.h"
#include "common/library.h"
#include <magick/MagickCore.h>
static FF_LIBRARY_SYMBOL(ResizeImage)
static void* logoResize(const void* image, size_t width, size_t height, void* exceptionInfo)
+1 -2
View File
@@ -1,10 +1,9 @@
#ifdef FF_HAVE_IMAGEMAGICK7
#include "image.h"
#include "magickcore_wrapper.h"
#include "common/library.h"
#include <MagickCore/MagickCore.h>
static FF_LIBRARY_SYMBOL(ResizeImage)
static void* logoResize(const void* image, size_t width, size_t height, void* exceptionInfo)
+1 -5
View File
@@ -265,11 +265,7 @@ static bool compressBlob(void** blob, size_t* length)
#endif // FF_HAVE_ZLIB
//We use only the defines from here, that are exactly the same in both versions
#ifdef FF_HAVE_IMAGEMAGICK7
#include <MagickCore/MagickCore.h>
#else
#include <magick/MagickCore.h>
#endif
#include "magickcore_wrapper.h"
typedef struct ImageData
{
+13
View File
@@ -0,0 +1,13 @@
#pragma once
// ImageMagick-7/MagickCore/pixel-accessor.h:518:46: warning: implicit conversion from 'QuantumAny' (aka 'unsigned long long') to 'double' may lose precision
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-int-float-conversion"
#ifdef FF_HAVE_IMAGEMAGICK7
#include <MagickCore/MagickCore.h>
#elif defined(FF_HAVE_IMAGEMAGICK6)
#include <magick/MagickCore.h>
#endif
#pragma GCC diagnostic pop