Skip to content

Commit

Permalink
Adjust for Windows Python 3.12 causing lots of unused parameter warni…
Browse files Browse the repository at this point in the history
…ngs where the suppression doesn't work.
  • Loading branch information
christofmuc committed Jan 4, 2025
1 parent 5b596a3 commit c5d6d94
Show file tree
Hide file tree
Showing 15 changed files with 83 additions and 5 deletions.
2 changes: 1 addition & 1 deletion MidiKraft
2 changes: 1 addition & 1 deletion The-Orm/BCR2000_Component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ void BCR2000_Component::UpdateSynthListener::listenForMidiMessages(MidiInput* so
if (programChangeCap) {
programChangeCap->gotProgramChange(MidiProgramNumber::fromZeroBase(message.getProgramChangeNumber()));
if (location) {
auto patch = midikraft::awaitMidiCoroutine(papa_->librarian_.downloadEditBuffer(midikraft::MidiController::instance()->getMidiOutput(location->midiOutput()), UIModel::currentSynthOfPatchSmart(), nullptr));
auto patch = midikraft::awaitMidiCoroutine(papa_->librarian_.downloadEditBuffer(midikraft::MidiController::instance()->getMidiOutput(location->midiOutput()), UIModel::currentSynthOfPatchSmart(), nullptr, {}));
if (patch.size() > 0 && patch[0].patch()) {
updateAllKnobsFromPatch(patch[0].patch());
}
Expand Down
2 changes: 1 addition & 1 deletion The-Orm/PatchView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ void PatchView::retrieveEditBuffer()
auto midiLocation = midikraft::Capability::hasCapability<midikraft::MidiLocationCapability>(activeSynth);
if (activeSynth && midiLocation) {
midikraft::runMidiCoroutineWithCallback < std::vector<midikraft::PatchHolder>>(
librarian_.downloadEditBuffer(midikraft::MidiController::instance()->getMidiOutput(midiLocation->midiOutput()), activeSynth, nullptr),
librarian_.downloadEditBuffer(midikraft::MidiController::instance()->getMidiOutput(midiLocation->midiOutput()), activeSynth, nullptr, {}),
[this](std::vector<midikraft::PatchHolder> const& patchesLoaded) {
// There should only be one edit buffer, just check that this is true here
jassert(patchesLoaded.size() == 1);
Expand Down
7 changes: 7 additions & 0 deletions The-Orm/ScriptedQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@

#include "Logger.h"

#ifdef _MSC_VER
#pragma warning ( push )
#pragma warning ( disable: 4100 )
#endif
#include <pybind11/embed.h>
#include <spdlog/spdlog.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

namespace py = pybind11;
using namespace pybind11::literals;
Expand Down
7 changes: 7 additions & 0 deletions adaptations/GenericAdaptation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@
#include "GenericHasBanksCapability.h"
#include "GenericHasBankDescriptorsCapability.h"

#ifdef _MSC_VER
#pragma warning ( push )
#pragma warning ( disable: 4100 )
#endif
#include <pybind11/stl.h>
#ifdef _MSC_VER
#pragma warning ( pop )
#endif
#include <memory>
#include <spdlog/spdlog.h>
#include "SpdLogJuce.h"
Expand Down
7 changes: 7 additions & 0 deletions adaptations/GenericAdaptation.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@
#include "ProgramDumpCapability.h"
#include "BankDumpCapability.h"

#ifdef _MSC_VER
#pragma warning ( push )
#pragma warning ( disable: 4100 )
#endif
#include <pybind11/embed.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#include <fmt/format.h>
#include <spdlog/spdlog.h>

Expand Down
7 changes: 7 additions & 0 deletions adaptations/GenericBankDumpCapability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@

#include "Sysex.h"

#ifdef _MSC_VER
#pragma warning ( push )
#pragma warning ( disable: 4100 )
#endif
#include <pybind11/embed.h>
#include <pybind11/stl.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

#include <fmt/format.h>
#include <spdlog/spdlog.h>
Expand Down
7 changes: 7 additions & 0 deletions adaptations/GenericEditBufferCapability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@

#include "GenericPatch.h"

#ifdef _MSC_VER
#pragma warning ( push )
#pragma warning ( disable: 4100 )
#endif
#include <pybind11/embed.h>
#include <pybind11/stl.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

namespace py = pybind11;

Expand Down
7 changes: 7 additions & 0 deletions adaptations/GenericHasBankDescriptorsCapability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@
#include "GenericAdaptation.h"
#include "Sysex.h"

#ifdef _MSC_VER
#pragma warning ( push )
#pragma warning ( disable: 4100 )
#endif
#include <pybind11/embed.h>
#include <pybind11/stl.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

namespace py = pybind11;

Expand Down
7 changes: 7 additions & 0 deletions adaptations/GenericHasBanksCapability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
#include "GenericAdaptation.h"
#include "Sysex.h"

#ifdef _MSC_VER
#pragma warning ( push )
#pragma warning ( disable: 4100 )
#endif
#include <pybind11/embed.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

namespace py = pybind11;

Expand Down
8 changes: 7 additions & 1 deletion adaptations/GenericPatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@

#include "GenericAdaptation.h"

#include <pybind11/embed.h>
#ifdef _MSC_VER
#pragma warning ( push )
#pragma warning ( disable: 4100 )
#endif
#include <pybind11/stl.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

namespace py = pybind11;

Expand Down
7 changes: 7 additions & 0 deletions adaptations/GenericPatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@
#include "LayeredPatchCapability.h"
#include "StoredTagCapability.h"

#ifdef _MSC_VER
#pragma warning ( push )
#pragma warning ( disable: 4100 )
#endif
#include <pybind11/embed.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

#include <fmt/format.h>
#include <spdlog/spdlog.h>
Expand Down
7 changes: 7 additions & 0 deletions adaptations/GenericProgramDumpCapability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@

#include "Sysex.h"

#ifdef _MSC_VER
#pragma warning ( push )
#pragma warning ( disable: 4100 )
#endif
#include <pybind11/embed.h>
#include <pybind11/stl.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

namespace py = pybind11;

Expand Down
9 changes: 9 additions & 0 deletions adaptations/PythonUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@
#pragma once

#include <string>

#ifdef _MSC_VER
#pragma warning ( push )
#pragma warning ( disable: 4100 )
#endif
#include <pybind11/pybind11.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif


class PyStdErrOutStreamRedirect {
public:
Expand Down
2 changes: 1 addition & 1 deletion pytschirp

0 comments on commit c5d6d94

Please sign in to comment.