summaryrefslogtreecommitdiffstats
path: root/src/lib.c
diff options
context:
space:
mode:
authorsijanec <anton@sijanec.eu>2021-04-07 23:15:16 +0200
committersijanec <anton@sijanec.eu>2021-04-07 23:15:16 +0200
commita19e3705a228735eacadd713b28d49fe33bb726b (patch)
tree9c5fd6e62a24e7f893686b45da15ecda91b41a58 /src/lib.c
parentfuck (diff)
downloadsear.c-a19e3705a228735eacadd713b28d49fe33bb726b.tar
sear.c-a19e3705a228735eacadd713b28d49fe33bb726b.tar.gz
sear.c-a19e3705a228735eacadd713b28d49fe33bb726b.tar.bz2
sear.c-a19e3705a228735eacadd713b28d49fe33bb726b.tar.lz
sear.c-a19e3705a228735eacadd713b28d49fe33bb726b.tar.xz
sear.c-a19e3705a228735eacadd713b28d49fe33bb726b.tar.zst
sear.c-a19e3705a228735eacadd713b28d49fe33bb726b.zip
Diffstat (limited to 'src/lib.c')
-rw-r--r--src/lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib.c b/src/lib.c
index 5c0576e..8659431 100644
--- a/src/lib.c
+++ b/src/lib.c
@@ -84,6 +84,7 @@ void printNode (xmlNodePtr node, void * data) {
#define gnu_code_start \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wpedantic\"")
+ _Pragma ("GCC diagnostic ignored \"-Wformat=\"")
#define gnu_code_end \
_Pragma ("GCC diagnostic pop")
/* this is the definition of the anonymous function - source: https://en.wikipedia.org/wiki/Anonymous_function#GCC */
@@ -94,6 +95,8 @@ void printNode (xmlNodePtr node, void * data) {
&l_anonymous_functions_name; \
})
char * htmlspecialchars (const char * i) { /* remember to free the output */
+ if (!i)
+ return NULL;
size_t s = 128;
char * o = malloc(s);
size_t w = 0;