Skip to content

Commit

Permalink
clang-format guards
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Nov 26, 2022
1 parent 79eb7ed commit 496d887
Show file tree
Hide file tree
Showing 124 changed files with 266 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Engine/AppInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@
#include <QtNetwork/QNetworkReply>

// ofxhPropertySuite.h:565:37: warning: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]
// clang-format off
CLANG_DIAG_OFF(unknown-pragmas)
CLANG_DIAG_OFF(tautological-undefined-compare) // appeared in clang 3.5
#include <ofxhImageEffect.h>
CLANG_DIAG_ON(tautological-undefined-compare)
CLANG_DIAG_ON(unknown-pragmas)
// clang-format on

#include "Global/QtCompat.h" // removeFileExtension
#include "Global/PythonUtils.h"
Expand Down
2 changes: 2 additions & 0 deletions Engine/AppManagerPrivate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@
#include <sstream> // stringstream

GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
// clang-format off
GCC_DIAG_OFF(unused-parameter)
#include <boost/serialization/export.hpp>
#include <boost/archive/binary_oarchive.hpp>
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
GCC_DIAG_ON(unused-parameter)
// clang-format on

#include <QtCore/QDebug>
#include <QtCore/QProcess>
Expand Down
2 changes: 2 additions & 0 deletions Engine/Bezier.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@
#include <string>
#include <utility>

// clang-format off
CLANG_DIAG_OFF(deprecated-declarations)
#include <QtCore/QObject>
CLANG_DIAG_ON(deprecated-declarations)
// clang-format on

#include "Global/GlobalDefines.h"

Expand Down
2 changes: 2 additions & 0 deletions Engine/BezierCPSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
// clang-format off
GCC_DIAG_OFF(unused-parameter)
#include <boost/archive/basic_archive.hpp>
#include <boost/serialization/base_object.hpp>
Expand All @@ -43,6 +44,7 @@ GCC_DIAG_OFF(unused-parameter)
#include <boost/serialization/map.hpp>
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
GCC_DIAG_ON(unused-parameter)
// clang-format on
#endif

#include "Engine/EngineFwd.h"
Expand Down
2 changes: 2 additions & 0 deletions Engine/BezierSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
// clang-format off
GCC_DIAG_OFF(unused-parameter)
#include <boost/version.hpp>
#if BOOST_VERSION == 107400
Expand All @@ -46,6 +47,7 @@ GCC_DIAG_OFF(unused-parameter)
#include <boost/serialization/map.hpp>
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
GCC_DIAG_ON(unused-parameter)
// clang-format on
#endif

#include "Engine/AppManager.h"
Expand Down
2 changes: 2 additions & 0 deletions Engine/BlockingBackgroundRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
#include <stdexcept>

#include "Global/Macros.h"
// clang-format off
CLANG_DIAG_OFF(deprecated-register) //'register' storage class specifier is deprecated
#include <QtCore/QDebug>
CLANG_DIAG_ON(deprecated-register)
// clang-format on

#include "Engine/AppManager.h"
#include "Engine/EffectInstance.h"
Expand Down
2 changes: 2 additions & 0 deletions Engine/CacheSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
// clang-format off
GCC_DIAG_OFF(unused-parameter)
// /opt/local/include/boost/serialization/smart_cast.hpp:254:25: warning: unused parameter 'u' [-Wunused-parameter]
#include <boost/archive/binary_iarchive.hpp>
Expand All @@ -47,6 +48,7 @@ GCC_DIAG_OFF(unused-parameter)
#include <boost/serialization/split_member.hpp>
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
GCC_DIAG_ON(unused-parameter)
// clang-format on
#endif

#include "Engine/Cache.h"
Expand Down
2 changes: 2 additions & 0 deletions Engine/CurveSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
// clang-format off
GCC_DIAG_OFF(unused-parameter)
// /opt/local/include/boost/serialization/smart_cast.hpp:254:25: warning: unused parameter 'u' [-Wunused-parameter]
#include <boost/archive/xml_iarchive.hpp>
Expand All @@ -42,6 +43,7 @@ GCC_DIAG_OFF(unused-parameter)
#include <boost/serialization/scoped_ptr.hpp>
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
GCC_DIAG_ON(unused-parameter)
// clang-format on
#endif

#include "Engine/CurvePrivate.h"
Expand Down
2 changes: 2 additions & 0 deletions Engine/FileDownloader.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@

#include "Global/Macros.h"

// clang-format off
CLANG_DIAG_OFF(deprecated-register) //'register' storage class specifier is deprecated
#include <QtCore/QObject>
CLANG_DIAG_ON(deprecated-register)
// clang-format on

#include "Engine/EngineFwd.h"

Expand Down
2 changes: 2 additions & 0 deletions Engine/FormatSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
// clang-format off
GCC_DIAG_OFF(unused-parameter)
#include <boost/archive/basic_archive.hpp>
#include <boost/serialization/base_object.hpp>
Expand All @@ -40,6 +41,7 @@ GCC_DIAG_OFF(unused-parameter)
#include <boost/serialization/nvp.hpp>
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
GCC_DIAG_ON(unused-parameter)
// clang-format on
#endif

#include "Engine/EngineFwd.h"
Expand Down
2 changes: 2 additions & 0 deletions Engine/FrameEntrySerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@

#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
// clang-format off
GCC_DIAG_OFF(unused-parameter)
#include <boost/archive/basic_archive.hpp>
#include <boost/serialization/version.hpp>
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
GCC_DIAG_ON(unused-parameter)
// clang-format on
#endif

#include "Engine/FrameEntry.h"
Expand Down
2 changes: 2 additions & 0 deletions Engine/FrameParamsSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@

#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
// clang-format off
GCC_DIAG_OFF(unused-parameter)
// /opt/local/include/boost/serialization/smart_cast.hpp:254:25: warning: unused parameter 'u' [-Wunused-parameter]
#include <boost/archive/binary_iarchive.hpp>
#include <boost/archive/binary_oarchive.hpp>
#include <boost/serialization/base_object.hpp>
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
GCC_DIAG_ON(unused-parameter)
// clang-format on
#endif
#include "Engine/FrameParams.h"
#include "Engine/EngineFwd.h"
Expand Down
2 changes: 2 additions & 0 deletions Engine/ImageCopyChannels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@


// disable some warnings due to unused parameters
// clang-format off
GCC_DIAG_OFF(unused-parameter)
# if ( ( __GNUC__ * 100) + __GNUC_MINOR__) >= 406
GCC_DIAG_OFF(unused-but-set-variable) // only on gcc >= 4.6
#endif
// clang-format on

// NATRON_COPY_CHANNELS_UNPREMULT:
// Repremult R G and B if output is premult and alpha was modified.
Expand Down
2 changes: 2 additions & 0 deletions Engine/ImageParamsSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "Global/GlobalDefines.h"

#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
// clang-format off
GCC_DIAG_OFF(unused-parameter)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
GCC_DIAG_OFF(sign-compare)
Expand All @@ -46,6 +47,7 @@ GCC_DIAG_OFF(sign-compare)
GCC_DIAG_ON(sign-compare)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
GCC_DIAG_ON(unused-parameter)
// clang-format on
#endif

#include "Engine/EngineFwd.h"
Expand Down
2 changes: 2 additions & 0 deletions Engine/ImagePlaneDesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

#if (!defined(Q_MOC_RUN) && !defined(SBK_RUN)) || defined(SBK2_RUN)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
// clang-format off
GCC_DIAG_OFF(unused-parameter)
// /opt/local/include/boost/serialization/smart_cast.hpp:254:25: warning: unused parameter 'u' [-Wunused-parameter]
#include <boost/archive/xml_iarchive.hpp>
Expand All @@ -41,6 +42,7 @@ GCC_DIAG_OFF(unused-parameter)
#include <boost/serialization/version.hpp>
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
GCC_DIAG_ON(unused-parameter)
// clang-format on
#endif

#define IMAGEPLANEDESC_SERIALIZATION_INTRODUCES_ID 2
Expand Down
2 changes: 2 additions & 0 deletions Engine/ImageSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "Engine/Image.h"

#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
// clang-format off
GCC_DIAG_OFF(unused-parameter)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
// /opt/local/include/boost/serialization/smart_cast.hpp:254:25: warning: unused parameter 'u' [-Wunused-parameter]
Expand All @@ -39,6 +40,7 @@ GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
#include <boost/serialization/string.hpp>
#include <boost/serialization/version.hpp>
GCC_DIAG_ON(unused-parameter)
// clang-format on
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
#endif

Expand Down
2 changes: 2 additions & 0 deletions Engine/KnobImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@
#include <QtCore/QCoreApplication>
#include <QtCore/QThread>

// clang-format off
CLANG_DIAG_OFF(mismatched-tags)
GCC_DIAG_OFF(unused-parameter)
#include <shiboken.h>
CLANG_DIAG_ON(mismatched-tags)
GCC_DIAG_ON(unused-parameter)
// clang-format on

#include "Global/PythonUtils.h"

Expand Down
2 changes: 2 additions & 0 deletions Engine/KnobSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <string>

#if !defined(SBK_RUN) && !defined(Q_MOC_RUN)
// clang-format off
GCC_DIAG_OFF(unused-parameter)
GCC_DIAG_OFF(sign-compare)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
Expand All @@ -45,6 +46,7 @@ GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
#include <boost/serialization/version.hpp>
GCC_DIAG_ON(unused-parameter)
GCC_DIAG_ON(sign-compare)
// clang-format on
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
#endif

Expand Down
2 changes: 2 additions & 0 deletions Engine/LRUHashTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include <list>
#include <utility>
#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
// clang-format off
CLANG_DIAG_OFF(unknown-pragmas)
CLANG_DIAG_OFF(redeclared-class-member)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
Expand All @@ -56,6 +57,7 @@ GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
#include <boost/bimap.hpp>
CLANG_DIAG_ON(redeclared-class-member)
CLANG_DIAG_ON(unknown-pragmas)
// clang-format on
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
#endif

Expand Down
2 changes: 2 additions & 0 deletions Engine/NodeGroupSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
// clang-format off
GCC_DIAG_OFF(unused-parameter)
// /opt/local/include/boost/serialization/smart_cast.hpp:254:25: warning: unused parameter 'u' [-Wunused-parameter]
#include <boost/archive/xml_iarchive.hpp>
Expand All @@ -39,6 +40,7 @@ GCC_DIAG_OFF(unused-parameter)
#include <boost/serialization/version.hpp>
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
GCC_DIAG_ON(unused-parameter)
// clang-format on
#endif

CLANG_DIAG_OFF(deprecated)
Expand Down
2 changes: 2 additions & 0 deletions Engine/NodeSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
// clang-format off
GCC_DIAG_OFF(unused-parameter)
GCC_DIAG_OFF(sign-compare)
// /opt/local/include/boost/serialization/smart_cast.hpp:254:25: warning: unused parameter 'u' [-Wunused-parameter]
Expand All @@ -44,6 +45,7 @@ GCC_DIAG_OFF(sign-compare)
GCC_DIAG_ON(sign-compare)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
GCC_DIAG_ON(unused-parameter)
// clang-format on
#endif

#include "Engine/KnobSerialization.h"
Expand Down
2 changes: 2 additions & 0 deletions Engine/NonKeyParamsSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
// clang-format off
GCC_DIAG_OFF(unused-parameter)
// /opt/local/include/boost/serialization/smart_cast.hpp:254:25: warning: unused parameter 'u' [-Wunused-parameter]
#include <boost/archive/binary_iarchive.hpp>
Expand All @@ -42,6 +43,7 @@ GCC_DIAG_OFF(unused-parameter)
#include <boost/archive/xml_oarchive.hpp>
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
GCC_DIAG_ON(unused-parameter)
// clang-format on
#endif

#include "Engine/EngineFwd.h"
Expand Down
4 changes: 4 additions & 0 deletions Engine/OSGLContext_mac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,9 @@ OSGLContext_mac::OSGLContext_mac(const FramebufferConfig& pixelFormatAttrs,
#endif // if 0
}

// clang-format off
GCC_DIAG_OFF(deprecated-declarations)
// clang-format on
static const char *RendererIDString(GLint ID)
{
static char holder[256] = {0};
Expand Down Expand Up @@ -514,7 +516,9 @@ static const char *RendererIDString(GLint ID)
}
}
}
// clang-format off
GCC_DIAG_ON(deprecated-declarations)
// clang-format on

void
OSGLContext_mac::getGPUInfos(std::list<OpenGLRendererInfo>& renderers)
Expand Down
2 changes: 2 additions & 0 deletions Engine/OfxClipInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ CLANG_DIAG_ON(deprecated)

//ofx
// ofxhPropertySuite.h:565:37: warning: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]
// clang-format off
CLANG_DIAG_OFF(unknown-pragmas)
CLANG_DIAG_OFF(tautological-undefined-compare) // appeared in clang 3.5
#include <ofxhImageEffect.h>
CLANG_DIAG_ON(tautological-undefined-compare)
CLANG_DIAG_ON(unknown-pragmas)
// clang-format on
#include <ofxPixels.h>

#include "Global/GlobalDefines.h"
Expand Down
2 changes: 2 additions & 0 deletions Engine/OfxEffectInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <QtCore/QPointF>

// ofxhPropertySuite.h:565:37: warning: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]
// clang-format off
CLANG_DIAG_OFF(unknown-pragmas)
CLANG_DIAG_OFF(tautological-undefined-compare) // appeared in clang 3.5
#include <ofxhPluginCache.h>
Expand All @@ -46,6 +47,7 @@ CLANG_DIAG_OFF(tautological-undefined-compare) // appeared in clang 3.5
#include <ofxhHost.h>
CLANG_DIAG_ON(tautological-undefined-compare)
CLANG_DIAG_ON(unknown-pragmas)
// clang-format on

#include <tuttle/ofxReadWrite.h>
#include <ofxNatron.h>
Expand Down
Loading

0 comments on commit 496d887

Please sign in to comment.