From: Sebastian Harl Date: Fri, 2 May 2014 15:27:40 +0000 (+0200) Subject: sysdb: Fixed incompatible pointer type warning reported by clang. X-Git-Tag: sysdb-0.1.0~43 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=13c715e946d6c32e68b1f8f13390bd5c8ededc8c;p=sysdb.git sysdb: Fixed incompatible pointer type warning reported by clang. --- diff --git a/src/tools/sysdb/input.c b/src/tools/sysdb/input.c index b515c4e..8d91048 100644 --- a/src/tools/sysdb/input.c +++ b/src/tools/sysdb/input.c @@ -223,7 +223,7 @@ sdb_input_mainloop(void) } /* sdb_input_mainloop */ ssize_t -sdb_input_readline(char *buf, int *n_chars, size_t max_chars) +sdb_input_readline(char *buf, size_t *n_chars, size_t max_chars) { const char *data; size_t len; diff --git a/src/tools/sysdb/input.h b/src/tools/sysdb/input.h index 40bd7c0..35b37b8 100644 --- a/src/tools/sysdb/input.h +++ b/src/tools/sysdb/input.h @@ -80,7 +80,7 @@ sdb_input_mainloop(void); * - A negative value in case of an error. */ ssize_t -sdb_input_readline(char *buf, int *n_chars, size_t max_chars); +sdb_input_readline(char *buf, size_t *n_chars, size_t max_chars); /* * sdb_input_exec_query: diff --git a/src/tools/sysdb/scanner.l b/src/tools/sysdb/scanner.l index 4d9fea5..cd465ce 100644 --- a/src/tools/sysdb/scanner.l +++ b/src/tools/sysdb/scanner.l @@ -44,7 +44,7 @@ # undef YY_INPUT #endif #define YY_INPUT(buf, result, max_size) \ - sdb_input_readline((buf), &(result), (max_size)) + sdb_input_readline((buf), (size_t *)&(result), (max_size)) #define APPEND() \ do { \