From: Brian Aker Date: Mon, 19 Sep 2011 16:38:43 +0000 (-0700) Subject: Clang fixes X-Git-Tag: 0.53~13 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=a8c94e3cfba54f0d1e2689f77b4948d84d4da27b;p=awesomized%2Flibmemcached Clang fixes --- diff --git a/libmemcached/csl/scanner.cc b/libmemcached/csl/scanner.cc index 254dda92..1865cc45 100644 --- a/libmemcached/csl/scanner.cc +++ b/libmemcached/csl/scanner.cc @@ -12,12 +12,14 @@ #pragma GCC diagnostic ignored "-Wunused-parameter" #endif +#define YY_NO_INPUT + #define YY_EXTRA_TYPE Context* -#line 21 "libmemcached/csl/scanner.cc" +#line 23 "libmemcached/csl/scanner.cc" #define YY_INT_ALIGNED short int @@ -1091,13 +1093,13 @@ static yyconst flex_int16_t yy_chk[1786] = static yyconst flex_int16_t yy_rule_linenum[65] = { 0, - 79, 81, 83, 85, 87, 90, 94, 96, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 127, 128, 130, 132, - 133, 134, 135, 136, 137, 139, 140, 143, 148, 149, - 150, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 162, 171, 189, 196 + 81, 83, 85, 87, 89, 92, 96, 98, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 129, 130, 132, 134, + 135, 136, 137, 138, 139, 141, 142, 145, 150, 151, + 152, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 164, 173, 191, 198 } ; /* The intent behind this definition is that it'll catch @@ -1128,7 +1130,7 @@ static yyconst flex_int16_t yy_rule_linenum[65] = * along with this program. If not, see . */ -#line 40 "libmemcached/csl/scanner.l" +#line 42 "libmemcached/csl/scanner.l" #include #include @@ -1152,7 +1154,7 @@ static yyconst flex_int16_t yy_rule_linenum[65] = #define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM) -#line 1156 "libmemcached/csl/scanner.cc" +#line 1158 "libmemcached/csl/scanner.cc" #define INITIAL 0 @@ -1455,11 +1457,11 @@ YY_DECL struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* %% [7.0] user's declarations go here */ -#line 76 "libmemcached/csl/scanner.l" +#line 78 "libmemcached/csl/scanner.l" -#line 1463 "libmemcached/csl/scanner.cc" +#line 1465 "libmemcached/csl/scanner.cc" yylval = yylval_param; @@ -1578,28 +1580,28 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 79 "libmemcached/csl/scanner.l" +#line 81 "libmemcached/csl/scanner.l" { return yytext[0];} YY_BREAK case 2: YY_RULE_SETUP -#line 81 "libmemcached/csl/scanner.l" +#line 83 "libmemcached/csl/scanner.l" { yylval->number= atoi(yytext); return (NUMBER); } YY_BREAK case 3: YY_RULE_SETUP -#line 83 "libmemcached/csl/scanner.l" +#line 85 "libmemcached/csl/scanner.l" { yylval->number= atoi(yytext +1); return PORT; } YY_BREAK case 4: YY_RULE_SETUP -#line 85 "libmemcached/csl/scanner.l" +#line 87 "libmemcached/csl/scanner.l" { yylval->number= atoi(yytext +2); return WEIGHT_START; } YY_BREAK case 5: /* rule 5 can match eol */ YY_RULE_SETUP -#line 87 "libmemcached/csl/scanner.l" +#line 89 "libmemcached/csl/scanner.l" ; /* skip whitespace */ YY_BREAK case 6: @@ -1607,219 +1609,219 @@ case 6: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 90 "libmemcached/csl/scanner.l" +#line 92 "libmemcached/csl/scanner.l" { return COMMENT; } YY_BREAK case 7: YY_RULE_SETUP -#line 94 "libmemcached/csl/scanner.l" +#line 96 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; yyextra->set_server(); return yyextra->previous_token= SERVER; } YY_BREAK case 8: YY_RULE_SETUP -#line 96 "libmemcached/csl/scanner.l" +#line 98 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= SOCKET; } YY_BREAK case 9: YY_RULE_SETUP -#line 98 "libmemcached/csl/scanner.l" +#line 100 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= BINARY_PROTOCOL; } YY_BREAK case 10: YY_RULE_SETUP -#line 99 "libmemcached/csl/scanner.l" +#line 101 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= BUFFER_REQUESTS; } YY_BREAK case 11: YY_RULE_SETUP -#line 100 "libmemcached/csl/scanner.l" +#line 102 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= CONFIGURE_FILE; } YY_BREAK case 12: YY_RULE_SETUP -#line 101 "libmemcached/csl/scanner.l" +#line 103 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= CONNECT_TIMEOUT; } YY_BREAK case 13: YY_RULE_SETUP -#line 102 "libmemcached/csl/scanner.l" +#line 104 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= DISTRIBUTION; } YY_BREAK case 14: YY_RULE_SETUP -#line 103 "libmemcached/csl/scanner.l" +#line 105 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= HASH_WITH_NAMESPACE; } YY_BREAK case 15: YY_RULE_SETUP -#line 104 "libmemcached/csl/scanner.l" +#line 106 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= HASH; } YY_BREAK case 16: YY_RULE_SETUP -#line 105 "libmemcached/csl/scanner.l" +#line 107 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= IO_BYTES_WATERMARK; } YY_BREAK case 17: YY_RULE_SETUP -#line 106 "libmemcached/csl/scanner.l" +#line 108 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= IO_KEY_PREFETCH; } YY_BREAK case 18: YY_RULE_SETUP -#line 107 "libmemcached/csl/scanner.l" +#line 109 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= IO_MSG_WATERMARK; } YY_BREAK case 19: YY_RULE_SETUP -#line 108 "libmemcached/csl/scanner.l" +#line 110 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= NOREPLY; } YY_BREAK case 20: YY_RULE_SETUP -#line 109 "libmemcached/csl/scanner.l" +#line 111 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= NUMBER_OF_REPLICAS; } YY_BREAK case 21: YY_RULE_SETUP -#line 110 "libmemcached/csl/scanner.l" +#line 112 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= POLL_TIMEOUT; } YY_BREAK case 22: YY_RULE_SETUP -#line 111 "libmemcached/csl/scanner.l" +#line 113 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= RANDOMIZE_REPLICA_READ; } YY_BREAK case 23: YY_RULE_SETUP -#line 112 "libmemcached/csl/scanner.l" +#line 114 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= RCV_TIMEOUT; } YY_BREAK case 24: YY_RULE_SETUP -#line 113 "libmemcached/csl/scanner.l" +#line 115 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= REMOVE_FAILED_SERVERS; } YY_BREAK case 25: YY_RULE_SETUP -#line 114 "libmemcached/csl/scanner.l" +#line 116 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= RETRY_TIMEOUT; } YY_BREAK case 26: YY_RULE_SETUP -#line 115 "libmemcached/csl/scanner.l" +#line 117 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= SND_TIMEOUT; } YY_BREAK case 27: YY_RULE_SETUP -#line 116 "libmemcached/csl/scanner.l" +#line 118 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= SOCKET_RECV_SIZE; } YY_BREAK case 28: YY_RULE_SETUP -#line 117 "libmemcached/csl/scanner.l" +#line 119 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= SOCKET_SEND_SIZE; } YY_BREAK case 29: YY_RULE_SETUP -#line 118 "libmemcached/csl/scanner.l" +#line 120 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= SORT_HOSTS; } YY_BREAK case 30: YY_RULE_SETUP -#line 119 "libmemcached/csl/scanner.l" +#line 121 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= SUPPORT_CAS; } YY_BREAK case 31: YY_RULE_SETUP -#line 120 "libmemcached/csl/scanner.l" +#line 122 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= _TCP_KEEPALIVE; } YY_BREAK case 32: YY_RULE_SETUP -#line 121 "libmemcached/csl/scanner.l" +#line 123 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= _TCP_KEEPIDLE; } YY_BREAK case 33: YY_RULE_SETUP -#line 122 "libmemcached/csl/scanner.l" +#line 124 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= _TCP_NODELAY; } YY_BREAK case 34: YY_RULE_SETUP -#line 123 "libmemcached/csl/scanner.l" +#line 125 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= USE_UDP; } YY_BREAK case 35: YY_RULE_SETUP -#line 124 "libmemcached/csl/scanner.l" +#line 126 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= USER_DATA; } YY_BREAK case 36: YY_RULE_SETUP -#line 125 "libmemcached/csl/scanner.l" +#line 127 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= VERIFY_KEY; } YY_BREAK case 37: YY_RULE_SETUP -#line 127 "libmemcached/csl/scanner.l" +#line 129 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= POOL_MIN; } YY_BREAK case 38: YY_RULE_SETUP -#line 128 "libmemcached/csl/scanner.l" +#line 130 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= POOL_MAX; } YY_BREAK case 39: YY_RULE_SETUP -#line 130 "libmemcached/csl/scanner.l" +#line 132 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= NAMESPACE; } YY_BREAK case 40: YY_RULE_SETUP -#line 132 "libmemcached/csl/scanner.l" +#line 134 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= INCLUDE; } YY_BREAK case 41: YY_RULE_SETUP -#line 133 "libmemcached/csl/scanner.l" +#line 135 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= RESET; } YY_BREAK case 42: YY_RULE_SETUP -#line 134 "libmemcached/csl/scanner.l" +#line 136 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= PARSER_DEBUG; } YY_BREAK case 43: YY_RULE_SETUP -#line 135 "libmemcached/csl/scanner.l" +#line 137 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= SERVERS; } YY_BREAK case 44: YY_RULE_SETUP -#line 136 "libmemcached/csl/scanner.l" +#line 138 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= END; } YY_BREAK case 45: YY_RULE_SETUP -#line 137 "libmemcached/csl/scanner.l" +#line 139 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= ERROR; } YY_BREAK case 46: YY_RULE_SETUP -#line 139 "libmemcached/csl/scanner.l" +#line 141 "libmemcached/csl/scanner.l" { return yyextra->previous_token= TRUE; } YY_BREAK case 47: YY_RULE_SETUP -#line 140 "libmemcached/csl/scanner.l" +#line 142 "libmemcached/csl/scanner.l" { return yyextra->previous_token= FALSE; } YY_BREAK case 48: YY_RULE_SETUP -#line 143 "libmemcached/csl/scanner.l" +#line 145 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return UNKNOWN_OPTION; @@ -1827,67 +1829,67 @@ YY_RULE_SETUP YY_BREAK case 49: YY_RULE_SETUP -#line 148 "libmemcached/csl/scanner.l" +#line 150 "libmemcached/csl/scanner.l" { return CONSISTENT; } YY_BREAK case 50: YY_RULE_SETUP -#line 149 "libmemcached/csl/scanner.l" +#line 151 "libmemcached/csl/scanner.l" { return MODULA; } YY_BREAK case 51: YY_RULE_SETUP -#line 150 "libmemcached/csl/scanner.l" +#line 152 "libmemcached/csl/scanner.l" { return RANDOM; } YY_BREAK case 52: YY_RULE_SETUP -#line 152 "libmemcached/csl/scanner.l" +#line 154 "libmemcached/csl/scanner.l" { return MD5; } YY_BREAK case 53: YY_RULE_SETUP -#line 153 "libmemcached/csl/scanner.l" +#line 155 "libmemcached/csl/scanner.l" { return CRC; } YY_BREAK case 54: YY_RULE_SETUP -#line 154 "libmemcached/csl/scanner.l" +#line 156 "libmemcached/csl/scanner.l" { return FNV1_64; } YY_BREAK case 55: YY_RULE_SETUP -#line 155 "libmemcached/csl/scanner.l" +#line 157 "libmemcached/csl/scanner.l" { return FNV1A_64; } YY_BREAK case 56: YY_RULE_SETUP -#line 156 "libmemcached/csl/scanner.l" +#line 158 "libmemcached/csl/scanner.l" { return FNV1_32; } YY_BREAK case 57: YY_RULE_SETUP -#line 157 "libmemcached/csl/scanner.l" +#line 159 "libmemcached/csl/scanner.l" { return FNV1A_32; } YY_BREAK case 58: YY_RULE_SETUP -#line 158 "libmemcached/csl/scanner.l" +#line 160 "libmemcached/csl/scanner.l" { return HSIEH; } YY_BREAK case 59: YY_RULE_SETUP -#line 159 "libmemcached/csl/scanner.l" +#line 161 "libmemcached/csl/scanner.l" { return MURMUR; } YY_BREAK case 60: YY_RULE_SETUP -#line 160 "libmemcached/csl/scanner.l" +#line 162 "libmemcached/csl/scanner.l" { return JENKINS; } YY_BREAK case 61: YY_RULE_SETUP -#line 162 "libmemcached/csl/scanner.l" +#line 164 "libmemcached/csl/scanner.l" { yylval->server.port= MEMCACHED_DEFAULT_PORT; yylval->server.weight= 1; @@ -1899,7 +1901,7 @@ YY_RULE_SETUP YY_BREAK case 62: YY_RULE_SETUP -#line 171 "libmemcached/csl/scanner.l" +#line 173 "libmemcached/csl/scanner.l" { if (yyextra->is_server()) { @@ -1921,7 +1923,7 @@ YY_RULE_SETUP case 63: /* rule 63 can match eol */ YY_RULE_SETUP -#line 189 "libmemcached/csl/scanner.l" +#line 191 "libmemcached/csl/scanner.l" { config_get_text(yyscanner)[yyleng -1]= 0; yylval->string.c_str= yytext +1; @@ -1931,7 +1933,7 @@ YY_RULE_SETUP YY_BREAK case 64: YY_RULE_SETUP -#line 196 "libmemcached/csl/scanner.l" +#line 198 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return UNKNOWN; @@ -1939,10 +1941,10 @@ YY_RULE_SETUP YY_BREAK case 65: YY_RULE_SETUP -#line 201 "libmemcached/csl/scanner.l" +#line 203 "libmemcached/csl/scanner.l" ECHO; YY_BREAK -#line 1946 "libmemcached/csl/scanner.cc" +#line 1948 "libmemcached/csl/scanner.cc" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -3208,7 +3210,7 @@ void config_free (void * ptr , yyscan_t yyscanner) /* %ok-for-header */ -#line 201 "libmemcached/csl/scanner.l" +#line 203 "libmemcached/csl/scanner.l" diff --git a/libmemcached/csl/scanner.h b/libmemcached/csl/scanner.h index 6f28e20e..aa70a870 100644 --- a/libmemcached/csl/scanner.h +++ b/libmemcached/csl/scanner.h @@ -16,12 +16,14 @@ #pragma GCC diagnostic ignored "-Wunused-parameter" #endif +#define YY_NO_INPUT + #define YY_EXTRA_TYPE Context* -#line 25 "libmemcached/csl/scanner.h" +#line 27 "libmemcached/csl/scanner.h" #define YY_INT_ALIGNED short int @@ -473,9 +475,9 @@ extern int config_lex \ #undef YY_DECL #endif -#line 201 "libmemcached/csl/scanner.l" +#line 203 "libmemcached/csl/scanner.l" -#line 480 "libmemcached/csl/scanner.h" +#line 482 "libmemcached/csl/scanner.h" #undef config_IN_HEADER #endif /* config_HEADER_H */ diff --git a/libmemcached/csl/scanner.l b/libmemcached/csl/scanner.l index 2c109509..b4a6b480 100644 --- a/libmemcached/csl/scanner.l +++ b/libmemcached/csl/scanner.l @@ -31,6 +31,8 @@ #pragma GCC diagnostic ignored "-Wunused-parameter" #endif +#define YY_NO_INPUT + #define YY_EXTRA_TYPE Context* } diff --git a/libmemcached/hash.cc b/libmemcached/hash.cc index 8edd839d..42e46989 100644 --- a/libmemcached/hash.cc +++ b/libmemcached/hash.cc @@ -64,7 +64,6 @@ static uint32_t dispatch_host(const memcached_st *ptr, uint32_t hash) uint32_t num= ptr->ketama.continuum_points_counter; WATCHPOINT_ASSERT(ptr->ketama.continuum); - hash= hash; memcached_continuum_item_st *begin, *end, *left, *right, *middle; begin= left= ptr->ketama.continuum; end= right= ptr->ketama.continuum + num; diff --git a/libtest/gearmand.h b/libtest/gearmand.h index f6aa6c32..929a1b96 100644 --- a/libtest/gearmand.h +++ b/libtest/gearmand.h @@ -24,7 +24,7 @@ #include -namespace libtest { class Server; } +namespace libtest { struct Server; } namespace libtest {