mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
JUCE Demo: Increased the compiler warning level
This commit is contained in:
parent
62101b554c
commit
98cb1011bb
19 changed files with 49 additions and 40 deletions
|
|
@ -6,6 +6,7 @@ cmake_minimum_required(VERSION 3.4.1)
|
|||
SET(BINARY_NAME "juce_jni")
|
||||
|
||||
add_library("cpufeatures" STATIC "${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c")
|
||||
set_source_files_properties("${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" PROPERTIES COMPILE_FLAGS "-Wno-sign-conversion -Wno-gnu-statement-expression")
|
||||
|
||||
add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=10" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_yourcompany_jucedemo_JuceDemo" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=\"com/yourcompany/jucedemo/JuceDemo\"" "-DJUCE_UNIT_TESTS=1" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=3.0.0" "-DJUCE_APP_VERSION_HEX=0x30000")
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ android {
|
|||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments "-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-10", "-DANDROID_STL=c++_static", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_ARM_MODE=arm", "-DANDROID_ARM_NEON=TRUE"
|
||||
cFlags "-fsigned-char"
|
||||
cppFlags "-fsigned-char", "-std=c++11"
|
||||
cFlags "-fsigned-char", "-pedantic", "-Wall", "-Wshadow", "-Wno-missing-field-initializers", "-Wshadow", "-Wshorten-64-to-32", "-Wstrict-aliasing", "-Wuninitialized", "-Wunused-parameter", "-Wconversion", "-Wsign-compare", "-Wint-conversion", "-Woverloaded-virtual", "-Wreorder", "-Wconstant-conversion", "-Wsign-conversion", "-Wextra-semi"
|
||||
cppFlags "-fsigned-char", "-std=c++11", "-pedantic", "-Wall", "-Wshadow", "-Wno-missing-field-initializers", "-Wshadow", "-Wshorten-64-to-32", "-Wstrict-aliasing", "-Wuninitialized", "-Wunused-parameter", "-Wconversion", "-Wsign-compare", "-Wint-conversion", "-Woverloaded-virtual", "-Wreorder", "-Wconstant-conversion", "-Wsign-conversion", "-Wextra-semi"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@
|
|||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter";
|
||||
OTHER_CPLUSPLUSFLAGS = "-pedantic -Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wextra-semi";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.roli.JuceDemo;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
USE_HEADERMAP = NO; }; name = Debug; };
|
||||
|
|
@ -376,7 +376,7 @@
|
|||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter";
|
||||
OTHER_CPLUSPLUSFLAGS = "-pedantic -Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wextra-semi";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.roli.JuceDemo;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
USE_HEADERMAP = NO; }; name = Release; };
|
||||
|
|
|
|||
|
|
@ -345,6 +345,7 @@
|
|||
INFOPLIST_FILE = Info-App.plist;
|
||||
INFOPLIST_PREPROCESS = NO;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
OTHER_CPLUSPLUSFLAGS = "-pedantic -Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wextra-semi";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.roli.JuceDemo;
|
||||
USE_HEADERMAP = NO; }; name = Debug; };
|
||||
903E7C1C8383FB576E8BA554 = {isa = XCBuildConfiguration; buildSettings = {
|
||||
|
|
@ -377,6 +378,7 @@
|
|||
INFOPLIST_FILE = Info-App.plist;
|
||||
INFOPLIST_PREPROCESS = NO;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
OTHER_CPLUSPLUSFLAGS = "-pedantic -Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wextra-semi";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.roli.JuceDemo;
|
||||
USE_HEADERMAP = NO; }; name = Release; };
|
||||
A16C0416417EF9DF7B09973F = {isa = XCBuildConfiguration; buildSettings = {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
splashScreenColour="Dark" companyName="ROLI Ltd.">
|
||||
<EXPORTFORMATS>
|
||||
<XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="~/SDKs/vstsdk2.4" rtasFolder="~/SDKs/PT_80_SDK"
|
||||
objCExtraSuffix="hZh0GG" bigIcon="BvyE0d" extraCompilerFlags="-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter"
|
||||
objCExtraSuffix="hZh0GG" bigIcon="BvyE0d" extraCompilerFlags="-pedantic -Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wextra-semi"
|
||||
customPList="<plist> <dict> 	<key>NSAppTransportSecurity</key> 	<dict> 		<key>NSAllowsArbitraryLoads</key> 		<true/> 	</dict> </dict> </plist>">
|
||||
<CONFIGURATIONS>
|
||||
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="JuceDemo"
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
<XCODE_IPHONE targetFolder="Builds/iOS" vstFolder="~/SDKs/vstsdk2.4" rtasFolder="~/SDKs/PT_80_SDK"
|
||||
objCExtraSuffix="Lpywnl" bigIcon="BvyE0d" iosScreenOrientation="portraitlandscape"
|
||||
customPList="<plist> <dict> 	<key>NSAppTransportSecurity</key> 	<dict> 		<key>NSAllowsArbitraryLoads</key> 		<true/> 	</dict> </dict> </plist>"
|
||||
microphonePermissionNeeded="1">
|
||||
microphonePermissionNeeded="1" extraCompilerFlags="-pedantic -Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wextra-semi">
|
||||
<CONFIGURATIONS>
|
||||
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="JuceDemo"
|
||||
osxSDK="default" osxCompatibility="default" osxArchitecture="default"
|
||||
|
|
@ -145,7 +145,7 @@
|
|||
androidNDKPath="" androidBluetoothNeeded="0" bigIcon="BvyE0d"
|
||||
androidScreenOrientation="unspecified" androidMicNeeded="1" gradleToolchain="clang"
|
||||
gradleToolchainVersion="3.6" androidTheme="@android:style/Theme.NoTitleBar"
|
||||
microphonePermissionNeeded="1">
|
||||
microphonePermissionNeeded="1" extraCompilerFlags="-pedantic -Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wextra-semi">
|
||||
<CONFIGURATIONS>
|
||||
<CONFIGURATION name="Debug" androidArchitectures="armeabi x86" isDebug="1" optimisation="1"
|
||||
targetName="JuceDemo"/>
|
||||
|
|
|
|||
|
|
@ -755,4 +755,4 @@ Path MainAppWindow::getJUCELogoPath()
|
|||
"M232.4,353c-8.1,0-15-6-15-15.8v-22.5h5.6v22.2c0,6.6,3.9,10.8,9.5,10.8c5.6,0,9.5-4.3,9.5-10.8v-22.2h5.6v22.5C247.5,347,240.5,353,232.4,353z"
|
||||
"M272,353c-10.8,0-19.5-8.6-19.5-19.3c0-10.8,8.8-19.3,19.5-19.3c4.8,0,9,1.6,12.3,4.4l-3.3,4.1c-3.4-2.4-5.7-3.2-8.9-3.2c-7.7,0-13.8,6.2-13.8,14.1c0,7.9,6.1,14.1,13.8,14.1c3.1,0,5.6-1,8.8-3.2l3.3,4.1C280.1,351.9,276.4,353,272,353z"
|
||||
"M290.4,352.5v-37.8h22.7v5H296v11.2h16.5v5H296v11.6h17.2v5H290.4z");
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -376,7 +376,9 @@ private:
|
|||
if (! isLibrary())
|
||||
mo << "SET(BINARY_NAME \"juce_jni\")" << newLine << newLine;
|
||||
|
||||
mo << "add_library(\"cpufeatures\" STATIC \"${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c\")" << newLine << newLine;
|
||||
String cpufeaturesPath ("${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c");
|
||||
mo << "add_library(\"cpufeatures\" STATIC \"" << cpufeaturesPath << "\")" << newLine
|
||||
<< "set_source_files_properties(\"" << cpufeaturesPath << "\" PROPERTIES COMPILE_FLAGS \"-Wno-sign-conversion -Wno-gnu-statement-expression\")" << newLine << newLine;
|
||||
|
||||
{
|
||||
StringArray projectDefines (getEscapedPreprocessorDefs (getProjectPreprocessorDefs()));
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ MPESynthesiser::MPESynthesiser()
|
|||
{
|
||||
}
|
||||
|
||||
MPESynthesiser::MPESynthesiser (MPEInstrument* instrument) : MPESynthesiserBase (instrument)
|
||||
MPESynthesiser::MPESynthesiser (MPEInstrument* mpeInstrument) : MPESynthesiserBase (mpeInstrument)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,13 +36,14 @@ namespace OggVorbisNamespace
|
|||
#if JUCE_MSVC
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706 4995 4365 4456 4457 4459)
|
||||
#endif
|
||||
|
||||
#if JUCE_CLANG
|
||||
#elif JUCE_CLANG
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wconversion"
|
||||
#pragma clang diagnostic ignored "-Wshadow"
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-register"
|
||||
#elif JUCE_GCC
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
#endif
|
||||
|
||||
#include "oggvorbis/vorbisenc.h"
|
||||
|
|
@ -75,10 +76,10 @@ namespace OggVorbisNamespace
|
|||
|
||||
#if JUCE_MSVC
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
#if JUCE_CLANG
|
||||
#elif JUCE_CLANG
|
||||
#pragma clang diagnostic pop
|
||||
#elif JUCE_GCC
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#else
|
||||
#include <vorbis/vorbisenc.h>
|
||||
|
|
|
|||
|
|
@ -871,7 +871,7 @@ namespace WavFileHelpers
|
|||
|
||||
return xml.getMemoryBlock();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
struct ExtensibleWavSubFormat
|
||||
|
|
|
|||
|
|
@ -96,11 +96,11 @@ bool AudioProcessor::addBus (bool isInput)
|
|||
if (! canAddBus (isInput))
|
||||
return false;
|
||||
|
||||
BusProperties BusesProperties;
|
||||
if (! canApplyBusCountChange (isInput, true, BusesProperties))
|
||||
BusProperties busesProps;
|
||||
if (! canApplyBusCountChange (isInput, true, busesProps))
|
||||
return false;
|
||||
|
||||
createBus (isInput, BusesProperties);
|
||||
createBus (isInput, busesProps);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -113,8 +113,8 @@ bool AudioProcessor::removeBus (bool inputBus)
|
|||
if (! canRemoveBus (inputBus))
|
||||
return false;
|
||||
|
||||
BusProperties BusesProperties;
|
||||
if (! canApplyBusCountChange (inputBus, false, BusesProperties))
|
||||
BusProperties busesProps;
|
||||
if (! canApplyBusCountChange (inputBus, false, busesProps))
|
||||
return false;
|
||||
|
||||
const int busIdx = numBuses - 1;
|
||||
|
|
|
|||
|
|
@ -50,14 +50,14 @@ private:
|
|||
struct AutoRemovingTransportSource : public AudioTransportSource, private Timer
|
||||
{
|
||||
AutoRemovingTransportSource (MixerAudioSource& mixerToUse, AudioTransportSource* ts, bool ownSource,
|
||||
int samplesPerBlock, double sampleRate)
|
||||
int samplesPerBlock, double requiredSampleRate)
|
||||
: mixer (mixerToUse), transportSource (ts, ownSource)
|
||||
{
|
||||
jassert (ts != nullptr);
|
||||
|
||||
setSource (transportSource);
|
||||
|
||||
prepareToPlay (samplesPerBlock, sampleRate);
|
||||
prepareToPlay (samplesPerBlock, requiredSampleRate);
|
||||
start();
|
||||
|
||||
mixer.addInputSource (this, true);
|
||||
|
|
|
|||
|
|
@ -54,8 +54,17 @@
|
|||
//==============================================================================
|
||||
#include <juce_graphics/juce_graphics.h>
|
||||
|
||||
#if __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
#endif
|
||||
|
||||
#include "box2d/Box2D.h"
|
||||
|
||||
#if __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN // for some reason, Doxygen sees this as a re-definition of Box2DRenderer
|
||||
namespace juce
|
||||
{
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ private:
|
|||
JNI_CLASS_MEMBERS (CREATE_JNI_METHOD, CREATE_JNI_STATICMETHOD, CREATE_JNI_FIELD, CREATE_JNI_STATICFIELD); \
|
||||
} \
|
||||
\
|
||||
JNI_CLASS_MEMBERS (DECLARE_JNI_METHOD, DECLARE_JNI_METHOD, DECLARE_JNI_FIELD, DECLARE_JNI_FIELD); \
|
||||
JNI_CLASS_MEMBERS (DECLARE_JNI_METHOD, DECLARE_JNI_METHOD, DECLARE_JNI_FIELD, DECLARE_JNI_FIELD) \
|
||||
}; \
|
||||
static CppClassName ## _Class CppClassName;
|
||||
|
||||
|
|
|
|||
|
|
@ -58,19 +58,12 @@ JUCE_API bool JUCE_CALLTYPE Process::openEmailWithAttachments (const String& /*t
|
|||
return false;
|
||||
}
|
||||
|
||||
/* Pimpl (String address, bool isPost, const MemoryBlock& postData,
|
||||
URL::OpenStreamProgressCallback* progressCallback, void* progressCallbackContext,
|
||||
const String& headers, int timeOutMs, StringPairArray* responseHeaders,
|
||||
const int numRedirectsToFollow, const String& httpRequest)
|
||||
: statusCode (0)
|
||||
|
||||
*/
|
||||
//==============================================================================
|
||||
class WebInputStream::Pimpl
|
||||
{
|
||||
public:
|
||||
Pimpl (WebInputStream& pimplOwner, const URL& urlToCopy, bool shouldBePost)
|
||||
: owner (pimplOwner), url (urlToCopy), isPost (shouldBePost),
|
||||
Pimpl (WebInputStream&, const URL& urlToCopy, bool shouldBePost)
|
||||
: url (urlToCopy), isPost (shouldBePost),
|
||||
httpRequest (isPost ? "POST" : "GET")
|
||||
{}
|
||||
|
||||
|
|
@ -228,7 +221,6 @@ public:
|
|||
int statusCode = 0;
|
||||
|
||||
private:
|
||||
WebInputStream& owner;
|
||||
const URL url;
|
||||
bool isPost;
|
||||
int numRedirectsToFollow = 5, timeOutMs = 0;
|
||||
|
|
|
|||
|
|
@ -155,7 +155,9 @@
|
|||
#endif
|
||||
|
||||
//==============================================================================
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
#if JUCE_ANDROID
|
||||
#define JUCE_ATOMIC_AVAILABLE 0
|
||||
#elif defined(_LIBCPP_VERSION)
|
||||
#define JUCE_ATOMIC_AVAILABLE (_LIBCPP_VERSION >= 3700)
|
||||
#elif defined (__GLIBCXX__)
|
||||
#define JUCE_ATOMIC_AVAILABLE (__GLIBCXX__ >= 20130322) // GCC versions 4.8 and later
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ void FilenameComponent::buttonClicked (Button*)
|
|||
setCurrentFile (fc.getResult(), true);
|
||||
}
|
||||
#else
|
||||
ignoreUnused (isSaving);
|
||||
jassertfalse; // needs rewriting to deal with non-modal environments
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -611,9 +611,9 @@ void MouseInputSource::forceMouseCursorUpdate() { pimpl
|
|||
void MouseInputSource::setScreenPosition (Point<float> p) { pimpl->setScreenPosition (p); }
|
||||
|
||||
void MouseInputSource::handleEvent (ComponentPeer& peer, Point<float> pos, int64 time, ModifierKeys mods,
|
||||
float pressure, float orientation, const PenDetails& pen)
|
||||
float pressure, float orientation, const PenDetails& penDetails)
|
||||
{
|
||||
pimpl->handleEvent (peer, pos, Time (time), mods.withOnlyMouseButtons(), pressure, orientation, pen);
|
||||
pimpl->handleEvent (peer, pos, Time (time), mods.withOnlyMouseButtons(), pressure, orientation, penDetails);
|
||||
}
|
||||
|
||||
void MouseInputSource::handleWheel (ComponentPeer& peer, Point<float> pos, int64 time, const MouseWheelDetails& wheel)
|
||||
|
|
|
|||
|
|
@ -121,7 +121,6 @@ class AndroidComponentPeer : public ComponentPeer,
|
|||
public:
|
||||
AndroidComponentPeer (Component& comp, const int windowStyleFlags)
|
||||
: ComponentPeer (comp, windowStyleFlags),
|
||||
usingAndroidGraphics (false),
|
||||
fullScreen (false),
|
||||
sizeAllocated (0),
|
||||
scale ((float) Desktop::getInstance().getDisplays().getMainDisplay().scale)
|
||||
|
|
@ -589,7 +588,7 @@ private:
|
|||
//==============================================================================
|
||||
GlobalRef view;
|
||||
GlobalRef buffer;
|
||||
bool usingAndroidGraphics, fullScreen;
|
||||
bool fullScreen;
|
||||
int sizeAllocated;
|
||||
float scale;
|
||||
static AndroidComponentPeer* frontWindow;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue