summaryrefslogtreecommitdiffstats
path: root/src/lib.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;