mirror of https://github.com/PCSX2/pcsx2.git
common: Silence -Wunused-function clang warnings. (#3127)
v2: Use pragma instead of [[maybe_unused]]. v3: Silence warnings with older clang versions too.
This commit is contained in:
parent
7bf920b07c
commit
293983ea71
|
@ -34,6 +34,11 @@
|
|||
// on what it's built for.
|
||||
//
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
static GtkWidget *ps_gtk_hbox_new(int padding = 5)
|
||||
{
|
||||
#if GTK_MAJOR_VERSION < 3
|
||||
|
@ -131,3 +136,7 @@ static void pcsx2_message(const wchar_t *fmt, ...)
|
|||
gtk_dialog_run(GTK_DIALOG(dialog));
|
||||
gtk_widget_destroy(dialog);
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
|
|
@ -69,16 +69,21 @@ static __inline__ __attribute__((always_inline)) unsigned long long xgetbv(unsig
|
|||
|
||||
// Rotate instruction
|
||||
#if defined(__clang__) && __clang_major__ < 9
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
|
||||
// Seriously what is so complicated to provided this bunch of intrinsics in clangs.
|
||||
[[maybe_unused]] static unsigned int _rotr(unsigned int x, int s)
|
||||
static unsigned int _rotr(unsigned int x, int s)
|
||||
{
|
||||
return (x >> s) | (x << (32 - s));
|
||||
}
|
||||
|
||||
[[maybe_unused]] static unsigned int _rotl(unsigned int x, int s)
|
||||
static unsigned int _rotl(unsigned int x, int s)
|
||||
{
|
||||
return (x << s) | (x >> (32 - s));
|
||||
}
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
// Not correctly defined in GCC4.8 and below ! (dunno for VS)
|
||||
|
|
Loading…
Reference in New Issue