kanshi: add patch to fix ndebug build.
Caught by new warnings enabled by meson update.
This commit is contained in:
parent
70f703a82e
commit
be267cecfc
2 changed files with 38 additions and 1 deletions
37
srcpkgs/kanshi/patches/assert.patch
Normal file
37
srcpkgs/kanshi/patches/assert.patch
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
commit 5ff7fad0a8391c0c3ef87f48e34e4e65c584d000
|
||||||
|
Author: Érico Rolim <erico.erc@gmail.com>
|
||||||
|
Date: Tue Feb 2 17:18:42 2021 -0300
|
||||||
|
|
||||||
|
parser: use abort() instead of assert(0).
|
||||||
|
|
||||||
|
assert(0) has no effect on NDEBUG builds, and means the program will
|
||||||
|
continue running in an unexpected state.
|
||||||
|
|
||||||
|
diff --git parser.c parser.c
|
||||||
|
index 40146e8..0ed1ba1 100644
|
||||||
|
--- parser.c
|
||||||
|
+++ parser.c
|
||||||
|
@@ -1,5 +1,4 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
-#include <assert.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
@@ -24,7 +23,7 @@ static const char *token_type_str(enum kanshi_token_type t) {
|
||||||
|
case KANSHI_TOKEN_NEWLINE:
|
||||||
|
return "newline";
|
||||||
|
}
|
||||||
|
- assert(0);
|
||||||
|
+ abort();
|
||||||
|
}
|
||||||
|
|
||||||
|
static int parser_read_char(struct kanshi_parser *parser) {
|
||||||
|
@@ -333,7 +332,7 @@ static struct kanshi_profile_output *parse_profile_output(
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
- assert(0);
|
||||||
|
+ abort();
|
||||||
|
}
|
||||||
|
has_key = false;
|
||||||
|
output->fields |= key;
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'kanshi'
|
# Template file for 'kanshi'
|
||||||
pkgname=kanshi
|
pkgname=kanshi
|
||||||
version=1.1.0
|
version=1.1.0
|
||||||
revision=1
|
revision=2
|
||||||
build_style=meson
|
build_style=meson
|
||||||
hostmakedepends="pkg-config scdoc wayland-devel"
|
hostmakedepends="pkg-config scdoc wayland-devel"
|
||||||
makedepends="wayland-devel"
|
makedepends="wayland-devel"
|
||||||
|
|
Loading…
Add table
Reference in a new issue