Skip to content

Commit

Permalink
Silencing strcpy warnings (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 authored Apr 8, 2024
1 parent 8d0754f commit 0a3e7a6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/wrapper/clap-juce-wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,13 @@ extern JUCE_API void *attachComponentToWindowRefVST(Component *, void *parentWin
} // namespace juce
#endif

JUCE_BEGIN_IGNORE_WARNINGS_MSVC(4996) // allow strncpy
// Some compilers generate warnings when we use `strncpy` instead
// of `strncpy_s`. However, other compilers don't support `strncpy_s`.
// So for now, we ignore those warnings, but once all the compilers
// that we care about support `strncpy_s`, we should remove these
// warnings guards and use `strncpy_s`.
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE("-Wdeprecated-declarations")
JUCE_BEGIN_IGNORE_WARNINGS_MSVC(4996)

#if !defined(CLAP_MISBEHAVIOUR_HANDLER_LEVEL)
#define CLAP_MISBEHAVIOUR_HANDLER_LEVEL "Ignore"
Expand Down Expand Up @@ -2284,6 +2290,7 @@ class ClapJuceWrapper : public clap::helpers::Plugin<
bool hasTransportInfo{false};
};

JUCE_END_IGNORE_WARNINGS_GCC_LIKE
JUCE_END_IGNORE_WARNINGS_MSVC

const char *features[] = {CLAP_FEATURES, nullptr};
Expand Down

0 comments on commit 0a3e7a6

Please # to comment.