Module: kamailio
Branch: master
Commit: e0736610b5173cc6363d4fbc8b203e1602166956
URL: 
https://github.com/kamailio/kamailio/commit/e0736610b5173cc6363d4fbc8b203e1602166956

Author: Victor Seva <linuxman...@torreviejawireless.org>
Committer: Victor Seva <linuxman...@torreviejawireless.org>
Date: 2018-04-09T13:13:23+02:00

db_redis: fix compilation warning

> CC (clang) [M db_redis.so]            redis_table.o
> redis_table.c:728:27: warning: comparison of constant -1 with expression of 
> type 'unsigned char' is always false 
> [-Wtautological-constant-out-of-range-compare]
>                     if (c == EOF) {
>                        ~ ^  ~~~
> redis_table.c:754:27: warning: comparison of constant -1 with expression of 
> type 'unsigned char' is always false 
> [-Wtautological-constant-out-of-range-compare]
>                     if (c == EOF) {
>                         ~ ^  ~~~
> redis_table.c:794:40: warning: comparison of constant -1 with expression of 
> type 'unsigned char' is always true 
> [-Wtautological-constant-out-of-range-compare]
>                     if (c != '\n' && c != EOF) {
>                                     ~ ^  ~~~
> redis_table.c:807:20: warning: comparison of constant -1 with expression of 
> type 'unsigned char' is always true 
> [-Wtautological-constant-out-of-range-compare]
>         } while (c != EOF);
>                  ~ ^  ~~~

---

Modified: src/modules/db_redis/redis_table.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/e0736610b5173cc6363d4fbc8b203e1602166956.diff
Patch: 
https://github.com/kamailio/kamailio/commit/e0736610b5173cc6363d4fbc8b203e1602166956.patch

---

diff --git a/src/modules/db_redis/redis_table.c 
b/src/modules/db_redis/redis_table.c
index 4af3ac93df..70757dc260 100644
--- a/src/modules/db_redis/redis_table.c
+++ b/src/modules/db_redis/redis_table.c
@@ -627,7 +627,7 @@ int db_redis_parse_schema(km_redis_con_t *con) {
     char full_path[_POSIX_PATH_MAX + 1];
     int path_len;
     struct stat fstat;
-    unsigned char c;
+    char c;
 
     enum {
         DBREDIS_SCHEMA_COLUMN_ST,


_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to