1
0

Fixed some warnings

This commit is contained in:
Patrick Gaskin
2020-04-22 13:06:39 -04:00
parent 4b45731adf
commit 28386d3eee
3 changed files with 6 additions and 3 deletions

View File

@@ -32,8 +32,8 @@ endef
$(call pkgconf,QT5CORE,Qt5Core)
$(call pkgconf,QT5WIDGETS,Qt5Widgets)
CFLAGS ?= -Wall -Wextra
CXXFLAGS ?= -Wall -Wextra
CFLAGS ?= -Wall -Wextra -Werror
CXXFLAGS ?= -Wall -Wextra -Werror
LDFLAGS ?=
# temporary workaround for broken cflags in kobo-toolchain Docker image:

View File

@@ -25,6 +25,9 @@
#endif
#endif
// prevent GCC from giving us warnings everywhere about the format specifiers for the ELF typedefs
#pragma GCC diagnostic ignored "-Wformat"
void *nmi_dlhook(void *handle, const char *symname, void *target, char **err_out) {
#define NMI_ERR_RET NULL

View File

@@ -86,7 +86,7 @@ extern "C" MenuTextItem* _nmi_menu_hook(void* _this, QMenu* menu, QString const&
QAction* action = AbstractNickelMenuController_createAction(_this, menu, item, true, true, true);
// note: we're capturing by value, i.e. the pointer to the global variable, rather then the stack variable, so this is safe
QObject::connect(action, &QAction::triggered, std::function<void(bool)>([it](bool checked){
QObject::connect(action, &QAction::triggered, std::function<void(bool)>([it](bool){
NMI_LOG("Item '%s' pressed...", it->lbl);
char *err;
if (it->act(it->arg, &err) && err) {