Be -Wunused-macros clean

This commit is contained in:
Ingo Weyrich 2020-02-07 20:18:35 +01:00
parent aae22fcc86
commit 8f291c3ff2
22 changed files with 1 additions and 63 deletions

View File

@ -402,7 +402,7 @@ if(WITH_PROF)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
endif() endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -Wunused-macros")
if(OPTION_OMP) if(OPTION_OMP)
find_package(OpenMP) find_package(OpenMP)
if(OPENMP_FOUND) if(OPENMP_FOUND)

View File

@ -56,7 +56,6 @@
#define TS 64 // Tile size #define TS 64 // Tile size
#define offset 25 // shift between tiles #define offset 25 // shift between tiles
#define fTS ((TS/2+1)) // second dimension of Fourier tiles
#define blkrad 1 // radius of block averaging #define blkrad 1 // radius of block averaging
#define epsilon 0.001f/(TS*TS) //tolerance #define epsilon 0.001f/(TS*TS) //tolerance

View File

@ -94,7 +94,6 @@
#ifdef WIN32 #ifdef WIN32
#include <sys/utime.h> #include <sys/utime.h>
#include <winsock2.h> #include <winsock2.h>
#define snprintf _snprintf
#define strcasecmp stricmp #define strcasecmp stricmp
#define strncasecmp strnicmp #define strncasecmp strnicmp
typedef __int64 INT64; typedef __int64 INT64;
@ -158,7 +157,6 @@ const float d65_white[3] = { 0.950456, 1, 1.088754 };
#define MIN(a,b) rtengine::min(a,static_cast<__typeof__(a)>(b)) #define MIN(a,b) rtengine::min(a,static_cast<__typeof__(a)>(b))
#define MAX(a,b) rtengine::max(a,static_cast<__typeof__(a)>(b)) #define MAX(a,b) rtengine::max(a,static_cast<__typeof__(a)>(b))
#define LIM(x,min,max) rtengine::LIM(x,static_cast<__typeof__(x)>(min),static_cast<__typeof__(x)>(max)) #define LIM(x,min,max) rtengine::LIM(x,static_cast<__typeof__(x)>(min),static_cast<__typeof__(x)>(max))
#define ULIM(x,y,z) rtengine::median(x,static_cast<__typeof__(x)>(y),static_cast<__typeof__(x)>(z))
#define CLIP(x) rtengine::CLIP(x) #define CLIP(x) rtengine::CLIP(x)
#define SWAP(a,b) { a=a+b; b=a-b; a=a-b; } #define SWAP(a,b) { a=a+b; b=a-b; a=a-b; }
@ -11022,7 +11020,6 @@ void CLASS nikon_14bit_load_raw()
/*RT*/#undef MIN /*RT*/#undef MIN
/*RT*/#undef ABS /*RT*/#undef ABS
/*RT*/#undef LIM /*RT*/#undef LIM
/*RT*/#undef ULIM
/*RT*/#undef CLIP /*RT*/#undef CLIP
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic pop #pragma GCC diagnostic pop

View File

@ -43,7 +43,6 @@
#include "color.h" #include "color.h"
#include "cJSON.h" #include "cJSON.h"
#define inkc_constant 0x696E6B43
namespace namespace
{ {

View File

@ -187,8 +187,6 @@ void Image16::getStdImage(const ColorTemp &ctemp, int tran, Imagefloat* image, P
gm /= area; gm /= area;
bm /= area; bm /= area;
#define GCLIP( x ) Color::gamma_srgb(CLIP(x))
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp parallel #pragma omp parallel
{ {

View File

@ -151,8 +151,6 @@ void Image8::getStdImage (const ColorTemp &ctemp, int tran, Imagefloat* image, P
gm /= area; gm /= area;
bm /= area; bm /= area;
#define GCLIP( x ) Color::gamma_srgb(CLIP(x))
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp parallel #pragma omp parallel
{ {

View File

@ -55,9 +55,6 @@
#include "mytime.h" #include "mytime.h"
#endif #endif
#undef CLIPD
#define CLIPD(a) ((a)>0.0f?((a)<1.0f?(a):1.0f):0.0f)
namespace { namespace {
using namespace rtengine; using namespace rtengine;

View File

@ -50,13 +50,6 @@
#include "cplx_wavelet_dec.h" #include "cplx_wavelet_dec.h"
#define TS 64 // Tile size
#define offset 25 // shift between tiles
#define fTS ((TS/2+1)) // second dimension of Fourier tiles
#define blkrad 1 // radius of block averaging
#define epsilon 0.001f/(TS*TS) //tolerance
namespace rtengine namespace rtengine
{ {

View File

@ -25,11 +25,6 @@
#define JFREAD(file,buf,sizeofbuf) \ #define JFREAD(file,buf,sizeofbuf) \
((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
#define JFWRITE(file,buf,sizeofbuf) \
((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
/* Expanded data source object for stdio input */ /* Expanded data source object for stdio input */
namespace namespace

View File

@ -9,7 +9,6 @@
#include <cstdio> /* fflush() */ #include <cstdio> /* fflush() */
#include <cstring> /* memset() */ #include <cstring> /* memset() */
#include <cmath> /* fsqrt() */ #include <cmath> /* fsqrt() */
#define fsqrt(X) sqrt(X)
/* Our includes */ /* Our includes */
#include "base.h" #include "base.h"

View File

@ -511,8 +511,6 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL
((filter >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)==0 || !filter) ((filter >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)==0 || !filter)
#define FISGREEN(filter,row,col) \ #define FISGREEN(filter,row,col) \
((filter >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)==1 || !filter) ((filter >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)==1 || !filter)
#define FISBLUE(filter,row,col) \
((filter >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)==2 || !filter)
RawMetaDataLocation Thumbnail::loadMetaDataFromRaw (const Glib::ustring& fname) RawMetaDataLocation Thumbnail::loadMetaDataFromRaw (const Glib::ustring& fname)
{ {

View File

@ -53,7 +53,6 @@ template<class T> T** allocArray (int W, int H)
return t; return t;
} }
#define HR_SCALE 2
StdImageSource::StdImageSource () : ImageSource(), img(nullptr), plistener(nullptr), full(false), max{}, rgbSourceModified(false) StdImageSource::StdImageSource () : ImageSource(), img(nullptr), plistener(nullptr), full(false), max{}, rgbSourceModified(false)
{ {

View File

@ -16,8 +16,6 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>. * along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef _CANONATTRIBS_
#define _CANONATTRIBS_
#include <cstdio> #include <cstdio>
#include <cmath> #include <cmath>
@ -2142,5 +2140,4 @@ const TagAttrib canonAttribs[] = {
{ -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}
}; };
} }
#endif

View File

@ -16,8 +16,6 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>. * along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef _FUJIATTRIBS_
#define _FUJIATTRIBS_
#include "rtexif.h" #include "rtexif.h"
@ -312,5 +310,4 @@ const TagAttrib fujiAttribs[] = {
{ -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}
}; };
} }
#endif

View File

@ -1,8 +1,6 @@
/* /*
* This file is part of RawTherapee. * This file is part of RawTherapee.
*/ */
#ifndef _KODAKATTRIBS_
#define _KODAKATTRIBS_
#include <string.h> #include <string.h>
#include "rtexif.h" #include "rtexif.h"
@ -161,5 +159,4 @@ const TagAttrib kodakIfdAttribs[] = {
}; };
} }
#endif

View File

@ -16,8 +16,6 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>. * along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef _NIKONATTRIBS_
#define _NIKONATTRIBS_
#include <cstdio> #include <cstdio>
#include <cstring> #include <cstring>
@ -1229,5 +1227,3 @@ const TagAttrib nikon3Attribs[] = {
}; };
} }
#endif

View File

@ -16,8 +16,6 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>. * along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef _OLYMPUSATTRIBS_
#define _OLYMPUSATTRIBS_
#include <string> #include <string>
#include <cmath> #include <cmath>
@ -850,5 +848,3 @@ const TagAttrib olympusAttribs[] = {
{ -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}
}; };
} }
#endif

View File

@ -1,8 +1,6 @@
/* /*
* This file is part of RawTherapee. * This file is part of RawTherapee.
*/ */
#ifndef _PANASONICATTRIBS_
#define _PANASONICATTRIBS_
#include <string.h> #include <string.h>
#include "rtexif.h" #include "rtexif.h"
@ -138,5 +136,3 @@ const TagAttrib panasonicRawAttribs[] = {
}; };
} }
#endif

View File

@ -16,8 +16,6 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>. * along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef _PENTAXATTRIBS_
#define _PENTAXATTRIBS_
#include <cmath> #include <cmath>
#include <cstdio> #include <cstdio>
@ -2216,7 +2214,6 @@ const TagAttrib pentaxCameraInfoAttribs[] = {
}; };
} }
#endif

View File

@ -15,8 +15,6 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>. * along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef _SONYMINOLTAATTRIBS_
#define _SONYMINOLTAATTRIBS_
#include <cmath> #include <cmath>
@ -2499,6 +2497,4 @@ const TagAttrib sonyCameraSettingsAttribs3[] = {
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};*/ {-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};*/
} }
#endif

View File

@ -17,8 +17,6 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>. * along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef _STDATTRIBS_
#define _STDATTRIBS_
#include <cstdio> #include <cstdio>
#include <cstring> #include <cstring>
@ -927,5 +925,3 @@ const TagAttrib ifdAttribs[] = {
{ -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}
}; };
} }
#endif

View File

@ -45,8 +45,6 @@
using namespace std; using namespace std;
#define CHECKTIME 2000
FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
filepanel(filepanel), filepanel(filepanel),
selectedDirectoryId(1), selectedDirectoryId(1),