Skip to content

Commit 1afb74a

Browse files
committed
Fix warnings + disable warnings for libjamesdsp
1 parent 7f6fad8 commit 1afb74a

File tree

10 files changed

+24
-19
lines changed

10 files changed

+24
-19
lines changed

.gitmodules

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
[submodule "src/subprojects/EELEditor"]
32
path = src/subprojects/EELEditor
4-
url = https://github.com/thepbone/EELEditor
3+
url = git@github.com:thepbone/EELEditor

libjamesdsp/libjamesdsp.pro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ CONFIG += c++17
77

88
QMAKE_CFLAGS += -std=gnu11 -O2
99

10+
CONFIG += warn_off # Disable warnings for library
11+
1012
DEFINES += CUSTOM_CMD
1113

1214
BASEPATH = $$PWD/subtree/Main/libjamesdsp/jni/jamesdsp/jdsp/

src/audio/pipewire/PwJamesDspPlugin.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
#include "PwBasePlugin.h"
55
#include "IDspElement.h"
66

7+
#pragma GCC diagnostic push
8+
#pragma GCC diagnostic ignored "-Wall"
79
extern "C" {
810
#include "jdsp_header.h"
911
}
12+
#pragma GCC diagnostic pop
13+
1014

1115
class PwJamesDspPlugin : public PwPluginBase, public IDspElement {
1216
public:

src/audio/pulseaudio/pipeline/JamesDspElement.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
#include "IDspElement.h"
55
#include "FilterElement.h"
66

7-
extern "C" {
8-
#include <jdsp_header.h>
9-
}
10-
117
class DspConfig;
128
class JamesDspElement : public FilterElement, public IDspElement
139
{

src/audio/pulseaudio/wrapper/gstjamesdsp.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
#include <gst/audio/audio.h>
66

77
G_BEGIN_DECLS
8+
9+
#pragma GCC diagnostic push
10+
#pragma GCC diagnostic ignored "-Wall"
811
#include <jdsp_header.h>
12+
#pragma GCC diagnostic pop
913

1014
#define GST_TYPE_JAMESDSP (gst_jamesdsp_get_type())
1115
#define GST_JAMESDSP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_JAMESDSP,Gstjamesdsp))

src/interface/fragment/SettingsFragment.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ SettingsFragment::SettingsFragment(TrayIcon *trayIcon,
101101
ui->paletteSelect->addItem("Stone", "stone");
102102
ui->paletteSelect->addItem("Custom", "custom");
103103

104-
for ( const auto &i : QStyleFactory::keys())
104+
for ( const auto& i : QStyleFactory::keys())
105105
{
106106
ui->themeSelect->addItem(i);
107107
}
@@ -193,7 +193,7 @@ SettingsFragment::SettingsFragment(TrayIcon *trayIcon,
193193
{
194194
AppConfig::instance().setLiveprogPath(ui->liveprog_path->text());
195195
});
196-
connect(ui->liveprog_autoextract, &QCheckBox::clicked, [this]()
196+
connect(ui->liveprog_autoextract, &QCheckBox::clicked, this, [this]()
197197
{
198198
AppConfig::instance().set(AppConfig::LiveprogAutoExtract, ui->liveprog_autoextract->isChecked());
199199
});
@@ -295,12 +295,12 @@ SettingsFragment::SettingsFragment(TrayIcon *trayIcon,
295295
connect(ui->github, &QPushButton::clicked, this, [] {
296296
QDesktopServices::openUrl(QUrl("https://github.com/Audio4Linux/JDSP4Linux"));
297297
});
298-
connect(ui->menu_edit, &QMenuEditor::targetChanged, [this, trayIcon]
298+
connect(ui->menu_edit, &QMenuEditor::targetChanged, this, [this, trayIcon]
299299
{
300300
auto menu = ui->menu_edit->exportMenu();
301301
trayIcon->updateTrayMenu(menu);
302302
});
303-
connect(ui->menu_edit, &QMenuEditor::resetPressed, [this, trayIcon]
303+
connect(ui->menu_edit, &QMenuEditor::resetPressed, this, [this, trayIcon]
304304
{
305305
QMessageBox::StandardButton reply = QMessageBox::question(this, "Warning", "Do you really want to restore the default layout?",
306306
QMessageBox::Yes | QMessageBox::No);

src/src.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
1111
TARGET = jamesdsp
1212
TEMPLATE = app
1313
!msvc {
14-
QMAKE_CXXFLAGS += "-Wno-old-style-cast -Wno-double-promotion -Wno-unused-function"
14+
QMAKE_CXXFLAGS += "-Wno-missing-field-initializers -Wno-unused-variable"
1515
}
1616

1717
USE_PULSEAUDIO: DEFINES += USE_PULSEAUDIO

src/subprojects/EELEditor

src/utils/Log.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
#include <QFile>
55
#include <QTime>
66

7+
#define C_RESET "\u001b[0m"
8+
#define C_RED "\u001b[31m"
9+
#define C_YELLOW "\u001b[33m"
10+
#define C_WHITE "\u001b[37m"
11+
#define C_FAINTWHITE "\u001b[2;37m"
12+
#define C_BACKRED "\u001b[41;37m"
13+
714
void Log::debug(const QString &log)
815
{
916
write(log, Debug);

src/utils/Log.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@ class Log
3838
Critical
3939
};
4040

41-
static constexpr char* C_RESET = "\u001b[0m";
42-
static constexpr char* C_RED = "\u001b[31m";
43-
static constexpr char* C_YELLOW = "\u001b[33m";
44-
static constexpr char* C_WHITE = "\u001b[37m";
45-
static constexpr char* C_FAINTWHITE = "\u001b[2;37m";
46-
static constexpr char* C_BACKRED = "\u001b[41;37m";
47-
4841
static void debug(const QString &log);
4942
static void information(const QString &log);
5043
static void warning(const QString &log);

0 commit comments

Comments
 (0)