Browse Source

Build: Add -Wdeprecated to recommended flags and fix new warnings

v6.1.6
reuk 3 years ago
parent
commit
1d1d743b9f
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
23 changed files with 19 additions and 76 deletions
  1. +1
    -1
      extras/Build/CMake/JUCEHelperTargets.cmake
  2. +0
    -2
      modules/juce_audio_basics/utilities/juce_SmoothedValue.h
  3. +2
    -1
      modules/juce_box2d/juce_box2d.h
  4. +0
    -4
      modules/juce_core/maths/juce_Random.cpp
  5. +0
    -3
      modules/juce_core/maths/juce_Random.h
  6. +0
    -4
      modules/juce_cryptography/encryption/juce_RSAKey.cpp
  7. +0
    -3
      modules/juce_cryptography/encryption/juce_RSAKey.h
  8. +3
    -0
      modules/juce_dsp/containers/juce_FixedSizeFunction_test.cpp
  9. +4
    -3
      modules/juce_dsp/containers/juce_SIMDRegister_Impl.h
  10. +0
    -8
      modules/juce_graphics/contexts/juce_GraphicsContext.cpp
  11. +0
    -3
      modules/juce_graphics/contexts/juce_GraphicsContext.h
  12. +2
    -2
      modules/juce_graphics/contexts/juce_LowLevelGraphicsContext.h
  13. +0
    -8
      modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.cpp
  14. +0
    -3
      modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.h
  15. +0
    -3
      modules/juce_graphics/geometry/juce_BorderSize.h
  16. +0
    -3
      modules/juce_gui_basics/layout/juce_FlexBox.cpp
  17. +1
    -4
      modules/juce_gui_basics/layout/juce_FlexBox.h
  18. +1
    -3
      modules/juce_gui_basics/layout/juce_GridItem.cpp
  19. +0
    -3
      modules/juce_gui_basics/layout/juce_GridItem.h
  20. +0
    -4
      modules/juce_gui_basics/mouse/juce_MouseEvent.cpp
  21. +5
    -4
      modules/juce_gui_basics/mouse/juce_MouseEvent.h
  22. +0
    -4
      modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp
  23. +0
    -3
      modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.h

+ 1
- 1
extras/Build/CMake/JUCEHelperTargets.cmake View File

@@ -11,7 +11,7 @@ elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQU
-Wsign-conversion -Wbool-conversion -Wextra-semi -Wunreachable-code
-Wcast-align -Wshift-sign-overflow -Wno-missing-field-initializers
-Wnullable-to-nonnull-conversion -Wno-ignored-qualifiers -Wswitch-enum
-Wpedantic
-Wpedantic -Wdeprecated
$<$<OR:$<COMPILE_LANGUAGE:CXX>,$<COMPILE_LANGUAGE:OBJCXX>>:
-Wzero-as-null-pointer-constant -Wunused-private-field
-Woverloaded-virtual -Wreorder


+ 0
- 2
modules/juce_audio_basics/utilities/juce_SmoothedValue.h View File

@@ -58,8 +58,6 @@ public:
/** Constructor. */
SmoothedValueBase() = default;
virtual ~SmoothedValueBase() {}
//==============================================================================
/** Returns true if the current value is currently being interpolated. */
bool isSmoothing() const noexcept { return countdown > 0; }


+ 2
- 1
modules/juce_box2d/juce_box2d.h View File

@@ -58,7 +58,8 @@
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wconversion",
"-Wshadow-field",
"-Wzero-as-null-pointer-constant",
"-Wsign-conversion")
"-Wsign-conversion",
"-Wdeprecated")
#include <climits>
#include <cfloat>


+ 0
- 4
modules/juce_core/maths/juce_Random.cpp View File

@@ -32,10 +32,6 @@ Random::Random() : seed (1)
setSeedRandomly();
}
Random::~Random() noexcept
{
}
void Random::setSeed (const int64 newSeed) noexcept
{
if (this == &getSystemRandom())


+ 0
- 3
modules/juce_core/maths/juce_Random.h View File

@@ -50,9 +50,6 @@ public:
*/
Random();
/** Destructor. */
~Random() noexcept;
/** Returns the next random 32 bit integer.
@returns a random integer from the full range 0x80000000 to 0x7fffffff
*/


+ 0
- 4
modules/juce_cryptography/encryption/juce_RSAKey.cpp View File

@@ -44,10 +44,6 @@ RSAKey::RSAKey (const String& s)
}
}
RSAKey::~RSAKey()
{
}
bool RSAKey::operator== (const RSAKey& other) const noexcept
{
return part1 == other.part1 && part2 == other.part2;


+ 0
- 3
modules/juce_cryptography/encryption/juce_RSAKey.h View File

@@ -107,9 +107,6 @@ public:
*/
explicit RSAKey (const String& stringRepresentation);
/** Destructor. */
~RSAKey();
bool operator== (const RSAKey& other) const noexcept;
bool operator!= (const RSAKey& other) const noexcept;


+ 3
- 0
modules/juce_dsp/containers/juce_FixedSizeFunction_test.cpp View File

@@ -204,6 +204,9 @@ public:
throw std::runtime_error { "this was meant to happen" };
}
BadConstructor (const BadConstructor&) = default;
BadConstructor& operator= (const BadConstructor&) = delete;
~BadConstructor() noexcept { counts.destructions += 1; }
void operator()() const noexcept { counts.calls += 1; }


+ 4
- 3
modules/juce_dsp/containers/juce_SIMDRegister_Impl.h View File

@@ -33,9 +33,10 @@ namespace dsp
template <typename Type>
struct SIMDRegister<Type>::ElementAccess
{
operator Type() const { return simd.get (idx); }
ElementAccess& operator= (Type scalar) noexcept { simd.set (idx, scalar); return *this; }
ElementAccess& operator= (ElementAccess& o) noexcept { return operator= ((Type) o); }
ElementAccess (const ElementAccess&) = default;
operator Type() const { return simd.get (idx); }
ElementAccess& operator= (Type scalar) noexcept { simd.set (idx, scalar); return *this; }
ElementAccess& operator= (const ElementAccess& o) noexcept { return operator= ((Type) o); }
private:
friend struct SIMDRegister;


+ 0
- 8
modules/juce_graphics/contexts/juce_GraphicsContext.cpp View File

@@ -44,10 +44,6 @@ namespace
}
}
//==============================================================================
LowLevelGraphicsContext::LowLevelGraphicsContext() {}
LowLevelGraphicsContext::~LowLevelGraphicsContext() {}
//==============================================================================
Graphics::Graphics (const Image& imageToDrawOnto)
: contextHolder (imageToDrawOnto.createLowLevelContext()),
@@ -61,10 +57,6 @@ Graphics::Graphics (LowLevelGraphicsContext& internalContext) noexcept
{
}
Graphics::~Graphics()
{
}
//==============================================================================
void Graphics::resetToDefaultState()
{


+ 0
- 3
modules/juce_graphics/contexts/juce_GraphicsContext.h View File

@@ -56,9 +56,6 @@ public:
*/
explicit Graphics (const Image& imageToDrawOnto);
/** Destructor. */
~Graphics();
//==============================================================================
/** Changes the current drawing colour.


+ 2
- 2
modules/juce_graphics/contexts/juce_LowLevelGraphicsContext.h View File

@@ -46,10 +46,10 @@ class JUCE_API LowLevelGraphicsContext
{
protected:
//==============================================================================
LowLevelGraphicsContext();
LowLevelGraphicsContext() = default;
public:
virtual ~LowLevelGraphicsContext();
virtual ~LowLevelGraphicsContext() = default;
/** Returns true if this device is vector-based, e.g. a printer. */
virtual bool isVectorDevice() const = 0;


+ 0
- 8
modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.cpp View File

@@ -83,10 +83,6 @@ LowLevelGraphicsPostScriptRenderer::LowLevelGraphicsPostScriptRenderer (OutputSt
<< scale << ' ' << scale << " scale\n\n";
}
LowLevelGraphicsPostScriptRenderer::~LowLevelGraphicsPostScriptRenderer()
{
}
//==============================================================================
bool LowLevelGraphicsPostScriptRenderer::isVectorDevice() const
{
@@ -168,10 +164,6 @@ LowLevelGraphicsPostScriptRenderer::SavedState::SavedState()
{
}
LowLevelGraphicsPostScriptRenderer::SavedState::~SavedState()
{
}
void LowLevelGraphicsPostScriptRenderer::saveState()
{
stateStack.add (new SavedState (*stateStack.getLast()));


+ 0
- 3
modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.h View File

@@ -42,8 +42,6 @@ public:
int totalWidth,
int totalHeight);
~LowLevelGraphicsPostScriptRenderer() override;
//==============================================================================
bool isVectorDevice() const override;
void setOrigin (Point<int>) override;
@@ -96,7 +94,6 @@ protected:
{
SavedState();
SavedState& operator= (const SavedState&) = delete;
~SavedState();
RectangleList<int> clip;
int xOffset, yOffset;


+ 0
- 3
modules/juce_graphics/geometry/juce_BorderSize.h View File

@@ -47,9 +47,6 @@ public:
*/
BorderSize() = default;
/** Creates a copy of another border. */
BorderSize (const BorderSize&) = default;
/** Creates a border with the given gaps. */
BorderSize (ValueType topGap, ValueType leftGap, ValueType bottomGap, ValueType rightGap) noexcept
: top (topGap), left (leftGap), bottom (bottomGap), right (rightGap)


+ 0
- 3
modules/juce_gui_basics/layout/juce_FlexBox.cpp View File

@@ -738,9 +738,6 @@ private:
};
//==============================================================================
FlexBox::FlexBox() noexcept = default;
FlexBox::~FlexBox() noexcept = default;
FlexBox::FlexBox (JustifyContent jc) noexcept : justifyContent (jc) {}
FlexBox::FlexBox (Direction d, Wrap w, AlignContent ac, AlignItems ai, JustifyContent jc) noexcept


+ 1
- 4
modules/juce_gui_basics/layout/juce_FlexBox.h View File

@@ -91,7 +91,7 @@ public:
//==============================================================================
/** Creates an empty FlexBox container with default parameters. */
FlexBox() noexcept;
FlexBox() noexcept = default;
/** Creates an empty FlexBox container with these parameters. */
FlexBox (Direction, Wrap, AlignContent, AlignItems, JustifyContent) noexcept;
@@ -99,9 +99,6 @@ public:
/** Creates an empty FlexBox container with the given content-justification mode. */
FlexBox (JustifyContent) noexcept;
/** Destructor. */
~FlexBox() noexcept;
//==============================================================================
/** Lays-out the box's items within the given rectangle. */
void performLayout (Rectangle<float> targetArea);


+ 1
- 3
modules/juce_gui_basics/layout/juce_GridItem.cpp View File

@@ -68,9 +68,7 @@ GridItem::Margin::Margin (float v) noexcept : left (v), right (v), top (v), bott
GridItem::Margin::Margin (float t, float r, float b, float l) noexcept : left (l), right (r), top (t), bottom (b) {}
//==============================================================================
GridItem::GridItem() noexcept {}
GridItem::~GridItem() noexcept {}
GridItem::GridItem() noexcept = default;
GridItem::GridItem (Component& componentToUse) noexcept : associatedComponent (&componentToUse) {}
GridItem::GridItem (Component* componentToUse) noexcept : associatedComponent (componentToUse) {}


+ 0
- 3
modules/juce_gui_basics/layout/juce_GridItem.h View File

@@ -128,9 +128,6 @@ public:
/** Creates an item with a given Component to use. */
GridItem (Component* componentToUse) noexcept;
/** Destructor. */
~GridItem() noexcept;
//==============================================================================
/** If this is non-null, it represents a Component whose bounds are controlled by this item. */
Component* associatedComponent = nullptr;


+ 0
- 4
modules/juce_gui_basics/mouse/juce_MouseEvent.cpp View File

@@ -57,10 +57,6 @@ MouseEvent::MouseEvent (MouseInputSource inputSource,
{
}
MouseEvent::~MouseEvent() noexcept
{
}
//==============================================================================
MouseEvent MouseEvent::getEventRelativeTo (Component* const otherComponent) const noexcept
{


+ 5
- 4
modules/juce_gui_basics/mouse/juce_MouseEvent.h View File

@@ -79,8 +79,11 @@ public:
int numberOfClicks,
bool mouseWasDragged) noexcept;
/** Destructor. */
~MouseEvent() noexcept;
MouseEvent (const MouseEvent&) = default;
MouseEvent& operator= (const MouseEvent&) = delete;
MouseEvent (MouseEvent&&) = default;
MouseEvent& operator= (MouseEvent&&) = delete;
//==============================================================================
/** The position of the mouse when the event occurred.
@@ -374,8 +377,6 @@ public:
private:
//==============================================================================
const uint8 numberOfClicks, wasMovedSinceMouseDown;
MouseEvent& operator= (const MouseEvent&);
};


+ 0
- 4
modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp View File

@@ -31,10 +31,6 @@ RecentlyOpenedFilesList::RecentlyOpenedFilesList()
{
}
RecentlyOpenedFilesList::~RecentlyOpenedFilesList()
{
}
//==============================================================================
void RecentlyOpenedFilesList::setMaxNumberOfItems (const int newMaxNumber)
{


+ 0
- 3
modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.h View File

@@ -46,9 +46,6 @@ public:
*/
RecentlyOpenedFilesList();
/** Destructor. */
~RecentlyOpenedFilesList();
//==============================================================================
/** Sets a limit for the number of files that will be stored in the list.


Loading…
Cancel
Save