Commit 692ebfd9 authored by Vladimír Čunát's avatar Vladimír Čunát

misc -Wpedantic fixes

parent 9e22ec1a
......@@ -1172,9 +1172,9 @@ void emit_string(SB *out, const char *str)
strcpy(b, "\\uFFFD");
b += 6;
} else {
*b++ = 0xEF;
*b++ = 0xBF;
*b++ = 0xBD;
*b++ = (char)0xEF;
*b++ = (char)0xBF;
*b++ = (char)0xBD;
}
s++;
} else if (c < 0x1F || (c >= 0x80 && escape_unicode)) {
......
......@@ -49,7 +49,7 @@
struct async_write_ctx {
uv_write_t write_req;
struct tls_common_ctx *t;
char buf[0];
char buf[];
};
static char const server_logstring[] = "tls";
......@@ -731,7 +731,7 @@ void tls_credentials_free(struct tls_credentials *tls_credentials) {
static int client_paramlist_entry_free(struct tls_client_paramlist_entry *entry)
{
DEBUG_MSG("freeing TLS parameters %p\n", entry);
DEBUG_MSG("freeing TLS parameters %p\n", (void *)entry);
while (entry->ca_files.len > 0) {
if (entry->ca_files.at[0] != NULL) {
......
......@@ -1717,7 +1717,7 @@ int worker_task_finalize(struct qr_task *task, int state)
void worker_task_complete(struct qr_task *task)
{
return qr_task_complete(task);
qr_task_complete(task);
}
void worker_task_ref(struct qr_task *task)
......
......@@ -256,7 +256,7 @@ static const char * find_leq_NSEC1(struct kr_cache *cache, const struct kr_query
};
assert((ssize_t)(kwz_sname.len) >= 0);
bool covers = /* we know for sure that the low end is before kwz_sname */
3 == kwz_between((knot_db_val_t){}, kwz_sname, kwz_hi);
3 == kwz_between((knot_db_val_t){ NULL, 0 }, kwz_sname, kwz_hi);
if (!covers) {
return "range search miss (!covers)";
}
......
......@@ -129,7 +129,7 @@ static inline void empty_root(node_t *root) {
static void assert_portability(void) {
#if FLAGS_HACK
assert(((union node){ .leaf = {
.key = ((void *)NULL) + 1,
.key = (tkey_t *)(((uint8_t *)NULL) + 1),
.val = NULL
} }).branch.flags == 1);
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment