From afbec9cf3cacb57523397ec2aa1d66bc1e5bb1bf Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 7 Apr 2015 14:37:12 +0100 Subject: [PATCH] Updates to avoid pedantic warnings in gcc. --- .../codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c | 2 +- modules/juce_events/native/juce_linux_Messaging.cpp | 2 ++ modules/juce_graphics/geometry/juce_Path.cpp | 10 +++++----- modules/juce_graphics/geometry/juce_Path.h | 6 +++--- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c index 8ea1978962..644b852c86 100644 --- a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c +++ b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c @@ -850,7 +850,7 @@ int floor1_encode(oggpack_buffer *opb,vorbis_block *vb, /* generate the partition's first stage cascade value */ if(csubbits){ - int maxval[8]; + int maxval[8] = { 0 }; for(k=0;kclass_subbook[classx][k]; if(booknum<0){ diff --git a/modules/juce_events/native/juce_linux_Messaging.cpp b/modules/juce_events/native/juce_linux_Messaging.cpp index 67711d9033..355dbfd805 100644 --- a/modules/juce_events/native/juce_linux_Messaging.cpp +++ b/modules/juce_events/native/juce_linux_Messaging.cpp @@ -235,6 +235,8 @@ namespace LinuxErrorHandling int errorHandler (Display* display, XErrorEvent* event) { + (void) display; (void) event; + #if JUCE_DEBUG_XERRORS char errorStr[64] = { 0 }; char requestStr[64] = { 0 }; diff --git a/modules/juce_graphics/geometry/juce_Path.cpp b/modules/juce_graphics/geometry/juce_Path.cpp index 204181a611..0f204e68d7 100644 --- a/modules/juce_graphics/geometry/juce_Path.cpp +++ b/modules/juce_graphics/geometry/juce_Path.cpp @@ -1567,17 +1567,17 @@ void Path::restoreFromString (StringRef stringVersion) } //============================================================================== -Path::Iterator::Iterator (const Path& path_) - : path (path_), - index (0) +Path::Iterator::Iterator (const Path& p) noexcept + : x1 (0), y1 (0), x2 (0), y2 (0), x3 (0), y3 (0), + path (p), index (0) { } -Path::Iterator::~Iterator() +Path::Iterator::~Iterator() noexcept { } -bool Path::Iterator::next() +bool Path::Iterator::next() noexcept { const float* const elements = path.data.elements; diff --git a/modules/juce_graphics/geometry/juce_Path.h b/modules/juce_graphics/geometry/juce_Path.h index 8068cc6f10..d2aeacae94 100644 --- a/modules/juce_graphics/geometry/juce_Path.h +++ b/modules/juce_graphics/geometry/juce_Path.h @@ -717,8 +717,8 @@ public: { public: //============================================================================== - Iterator (const Path& path); - ~Iterator(); + Iterator (const Path& path) noexcept; + ~Iterator() noexcept; //============================================================================== /** Moves onto the next element in the path. @@ -727,7 +727,7 @@ public: the elementType variable will be set to the type of the current element, and some of the x and y variables will be filled in with values. */ - bool next(); + bool next() noexcept; //============================================================================== enum PathElementType