[PATCH 3/3] Fix warning about discarded type qualifier.

Tomash Brechko tomash.brechko at gmail.com
Wed Nov 7 19:51:32 UTC 2007


It turned out that register qualifier was not involved, and the code
had a bug.

diff --git a/trunk/server/memcached.c b/trunk/server/memcached.c
index 1aa8af8..f4924cb 100644
--- a/trunk/server/memcached.c
+++ b/trunk/server/memcached.c
@@ -869,7 +869,7 @@ static void write_and_free(conn *c, char *buf, int bytes) {
 }
 
 inline static void process_stats_detail(conn *c, token_t *tokens) {
-    struct param *param;
+    const struct param *param;
 
     assert(c != NULL);
 
@@ -904,7 +904,7 @@ inline static void process_stats_detail(conn *c, token_t *tokens) {
 void process_stat(enum command_code code,
                   conn *c, token_t *tokens, size_t ntokens) {
     rel_time_t now = current_time;
-    struct param *param;
+    const struct param *param;
 
     assert(c != NULL);
 
@@ -1711,7 +1711,7 @@ static void process_command(conn *c, char *command) {
 
     token_t tokens[MAX_TOKENS];
     size_t ntokens;
-    struct command *cmd;
+    const struct command *cmd;
 
     assert(c != NULL);
 
-- 
1.5.3.5.529.ge3d6d


More information about the memcached mailing list