Skip to content

Commit 93ea52c

Browse files
committed
More warning fixes
1 parent c4be2cb commit 93ea52c

File tree

9 files changed

+61
-21
lines changed

9 files changed

+61
-21
lines changed

modules/yup_audio_devices/native/yup_CoreMidi_apple.mm

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -474,19 +474,27 @@ static void updateProtocolInfo(MIDIObjectRef entity, MidiDeviceInfo& info)
474474
#if YUP_HAS_NEW_COREMIDI_API
475475
SInt32 protocol = 0;
476476

477-
if (MIDIObjectGetIntegerProperty(entity, kMIDIPropertyProtocolID, &protocol) == noErr)
477+
if (@available(iOS 14.0, macOS 11.0, *))
478478
{
479-
if (protocol == kMIDIProtocol_2_0)
479+
if (MIDIObjectGetIntegerProperty(entity, kMIDIPropertyProtocolID, &protocol) == noErr)
480480
{
481-
info.protocol = ump::PacketProtocol::MIDI_2_0;
482-
info.supportsMidi2 = true;
483-
}
484-
else
485-
{
486-
info.protocol = ump::PacketProtocol::MIDI_1_0;
487-
info.supportsMidi2 = false;
481+
if (protocol == kMIDIProtocol_2_0)
482+
{
483+
info.protocol = ump::PacketProtocol::MIDI_2_0;
484+
info.supportsMidi2 = true;
485+
}
486+
else
487+
{
488+
info.protocol = ump::PacketProtocol::MIDI_1_0;
489+
info.supportsMidi2 = false;
490+
}
488491
}
489492
}
493+
else
494+
{
495+
info.protocol = ump::PacketProtocol::MIDI_1_0;
496+
info.supportsMidi2 = false;
497+
}
490498
#else
491499
ignoreUnused(entity, info);
492500
#endif

modules/yup_python/bindings/yup_YupCore_bindings.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@
3838
#include <typeinfo>
3939
#include <utility>
4040

41+
#ifndef YUP_PYBIND11_HIDDEN
42+
#if defined(__GNUC__) || defined(__clang__)
43+
#define YUP_PYBIND11_HIDDEN __attribute__ ((visibility ("hidden")))
44+
#else
45+
#define YUP_PYBIND11_HIDDEN
46+
#endif
47+
#endif
48+
4149
namespace PYBIND11_NAMESPACE
4250
{
4351
namespace detail
@@ -725,7 +733,7 @@ struct PyXmlElementComparator
725733
}
726734
};
727735

728-
struct PyXmlElementCallableComparator
736+
struct YUP_PYBIND11_HIDDEN PyXmlElementCallableComparator
729737
{
730738
explicit PyXmlElementCallableComparator (pybind11::function f)
731739
: fn (std::move (f))

modules/yup_python/scripting/yup_ScriptUtilities.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ std::optional<T> python_cast (const pybind11::object& value)
5555
5656
@param scriptEngine The script engine to redirect the streams to.
5757
*/
58-
struct YUP_API ScriptStreamRedirection
58+
struct ScriptStreamRedirection
5959
{
6060
ScriptStreamRedirection() noexcept;
6161
~ScriptStreamRedirection() noexcept;

thirdparty/flac_library/flac_library_1.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
#include "fixed_intrin_sse2.c"
3131
#include "fixed_intrin_sse42.c"
3232
#include "fixed_intrin_ssse3.c"
33+
34+
#if defined(CHECK_ORDER_IS_VALID)
35+
#undef CHECK_ORDER_IS_VALID
36+
#endif
37+
3338
#include "fixed.c"
3439
#include "float.c"
3540
#include "format.c"
@@ -41,13 +46,14 @@
4146
#include "lpc_intrin_sse41.c"
4247
#include "md5.c"
4348
#include "memory.c"
49+
#include "stream_decoder.c"
50+
#include "window.c"
51+
4452
//#include "metadata_iterators.c"
4553
//#include "metadata_object.c"
4654
//#include "ogg_decoder_aspect.c"
4755
//#include "ogg_encoder_aspect.c"
4856
//#include "ogg_helper.c"
4957
//#include "ogg_mapping.c"
50-
#include "stream_decoder.c"
51-
#include "window.c"
5258

5359
#include "flac_include_post.h"

thirdparty/harfbuzz/harfbuzz.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,20 @@
1919
==============================================================================
2020
*/
2121

22-
#include "harfbuzz.h"
23-
24-
#if defined(__GNUC__) || defined(__clang__)
22+
#if __clang__
23+
#pragma clang diagnostic push
24+
#pragma clang diagnostic ignored "-Wempty-body"
25+
#pragma clang diagnostic ignored "-Wunused-function"
26+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
27+
#elif __GNUC__
2528
#pragma GCC diagnostic push
2629
#pragma GCC diagnostic ignored "-Wempty-body"
2730
#pragma GCC diagnostic ignored "-Wunused-function"
2831
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2932
#endif
3033

34+
#include "harfbuzz.h"
35+
3136
#include "upstream/graph/gsubgpos-context.cc"
3237
//#include "upstream/harfbuzz-subset.cc"
3338
//#include "upstream/harfbuzz.cc"

thirdparty/opus_library/opus_library.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@
4343

4444
#pragma once
4545

46+
#include <math.h>
47+
48+
#if !defined(HAVE_LRINT) && !defined(_MSC_VER)
49+
#define HAVE_LRINT 1
50+
#endif
51+
52+
#if !defined(HAVE_LRINTF) && !defined(_MSC_VER)
53+
#define HAVE_LRINTF 1
54+
#endif
55+
4656
#if defined(__aarch64__) || defined(__ARM_NEON) || defined(__ARM_NEON__)
4757
#define OPUS_ARM_PRESUME_NEON_INTR 1
4858
#define OPUS_ARM_PRESUME_NEON 1

thirdparty/rive/include/rive/math/vec2d.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,4 @@ template <> struct hash<rive::Vec2D>
136136
};
137137
} // namespace std
138138

139-
#endif
139+
#endif

thirdparty/rive/rive.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@
1919
==============================================================================
2020
*/
2121

22-
#include "rive.h"
23-
2422
#if __clang__
2523
#pragma clang diagnostic push
2624
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
25+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
2726
#elif __GNUC__
2827
#pragma GCC diagnostic push
2928
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
@@ -32,6 +31,8 @@
3231
#pragma warning (disable : 4244)
3332
#endif
3433

34+
#include "rive.h"
35+
3536
#if !defined(_RIVE_INTERNAL_)
3637
#define _RIVE_INTERNAL_ 1
3738
#endif

thirdparty/rive_renderer/rive_renderer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,22 @@
1919
==============================================================================
2020
*/
2121

22-
#include "rive_renderer.h"
23-
2422
#if __clang__
2523
#pragma clang diagnostic push
2624
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
2725
#pragma clang diagnostic ignored "-Wattributes"
26+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
2827
#elif __GNUC__
2928
#pragma GCC diagnostic push
3029
#pragma GCC diagnostic ignored "-Wattributes"
30+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3131
#elif _MSC_VER
3232
__pragma (warning (push))
3333
__pragma (warning (disable: 4244))
3434
#endif
3535

36+
#include "rive_renderer.h"
37+
3638
#include "source/rive_renderer.cpp"
3739
#include "source/render_context.cpp"
3840
#include "source/rive_render_paint.cpp"

0 commit comments

Comments
 (0)