Browse Source

Fix a few gcc warnings

tags/1.9.8
falkTX 8 years ago
parent
commit
a8120cc0dd
6 changed files with 17 additions and 9 deletions
  1. +9
    -0
      source/modules/dgl/src/Window.cpp
  2. +2
    -2
      source/modules/juce_core/native/juce_linux_Files.cpp
  3. +1
    -1
      source/modules/juce_core/xml/juce_XmlElement.cpp
  4. +1
    -1
      source/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp
  5. +1
    -1
      source/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp
  6. +3
    -4
      source/native-plugins/zynaddsubfx/rtosc/rtosc.c

+ 9
- 0
source/modules/dgl/src/Window.cpp View File

@@ -25,6 +25,11 @@

#include "pugl/pugl.h"

#if defined(__GNUC__) && (__GNUC__ >= 6)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif

#if defined(DISTRHO_OS_WINDOWS)
# include "pugl/pugl_win.cpp"
#elif defined(DISTRHO_OS_MAC)
@@ -39,6 +44,10 @@ extern "C" {
# error Unsupported platform
#endif

#if defined(__GNUC__) && (__GNUC__ >= 6)
# pragma GCC diagnostic pop
#endif

#include "ApplicationPrivateData.hpp"
#include "WidgetPrivateData.hpp"
#include "../StandaloneWindow.hpp"


+ 2
- 2
source/modules/juce_core/native/juce_linux_Files.cpp View File

@@ -136,14 +136,14 @@ File File::getSpecialLocation (const SpecialLocationType type)
case invokedExecutableFile:
if (juce_argv != nullptr && juce_argc > 0)
return File (CharPointer_UTF8 (juce_argv[0]));
// deliberate fall-through...
// fall-through
case currentExecutableFile:
case currentApplicationFile:
#if ! JUCE_STANDALONE_APPLICATION
return juce_getExecutableFile();
#endif
// deliberate fall-through if this is not a shared-library
// fall-through
case hostApplicationPath:
{


+ 1
- 1
source/modules/juce_core/xml/juce_XmlElement.cpp View File

@@ -241,7 +241,7 @@ namespace XmlOutputFunctions
outputStream << (char) character;
break;
}
// Note: deliberate fall-through here!
// fall-through
default:
outputStream << "&#" << ((int) character) << ';';
break;


+ 1
- 1
source/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp View File

@@ -92,7 +92,7 @@ private:
{
case Z_STREAM_END:
finished = true;
// Deliberate fall-through..
// fall-through..
case Z_OK:
{
data += dataSize - stream.avail_in;


+ 1
- 1
source/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp View File

@@ -141,7 +141,7 @@ public:
{
case Z_STREAM_END:
finished = true;
// deliberate fall-through
// fall-through
case Z_OK:
data += dataSize - stream.avail_in;
dataSize = (z_uInt) stream.avail_in;


+ 3
- 4
source/native-plugins/zynaddsubfx/rtosc/rtosc.c View File

@@ -232,8 +232,7 @@ static size_t vsosc_null(const char *address,
return pos;
}

static const rtosc_cmp_options* default_cmp_options
= &((rtosc_cmp_options) { 0.0 });
static const rtosc_cmp_options default_cmp_options({ 0.0 });

int rtosc_arg_vals_eq(rtosc_arg_val_t* lhs, rtosc_arg_val_t* rhs,
size_t lsize, size_t rsize,
@@ -242,7 +241,7 @@ int rtosc_arg_vals_eq(rtosc_arg_val_t* lhs, rtosc_arg_val_t* rhs,
#define mfabs(val) (((val) >= 0) ? (val) : -(val))

if(!opt)
opt = default_cmp_options;
opt = &default_cmp_options;
if(lsize != rsize)
return 0;

@@ -319,7 +318,7 @@ int rtosc_arg_vals_cmp(rtosc_arg_val_t* lhs, rtosc_arg_val_t* rhs,
#define mfabs(val) (((val) >= 0) ? (val) : -(val))

if(!opt)
opt = default_cmp_options;
opt = &default_cmp_options;

size_t rval = 0;
size_t min = lsize > rsize ? rsize : lsize;


Loading…
Cancel
Save