From: Brian Aker Date: Mon, 17 Sep 2012 11:48:10 +0000 (-0700) Subject: Update after fixing clang issue with pragma. X-Git-Tag: 1.0.12~23^2~3 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=9b13e23dc5a1c11b93cefc9f188cf459af68bede;p=awesomized%2Flibmemcached Update after fixing clang issue with pragma. --- diff --git a/libmemcached/csl/parser.cc b/libmemcached/csl/parser.cc index 9ad1e659..0ff94b77 100644 --- a/libmemcached/csl/parser.cc +++ b/libmemcached/csl/parser.cc @@ -89,8 +89,10 @@ #endif #ifndef __INTEL_COMPILER +#ifndef __clang__ #pragma GCC diagnostic ignored "-Wlogical-op" #endif +#endif int conf_lex(YYSTYPE* lvalp, void* scanner); @@ -119,7 +121,7 @@ inline void __config_error(Context *context, yyscan_t *scanner, const char *erro /* Line 268 of yacc.c */ -#line 123 "libmemcached/csl/parser.cc" +#line 125 "libmemcached/csl/parser.cc" /* Enabling traces. */ #ifndef YYDEBUG @@ -232,7 +234,7 @@ inline void __config_error(Context *context, yyscan_t *scanner, const char *erro /* Line 343 of yacc.c */ -#line 236 "libmemcached/csl/parser.cc" +#line 238 "libmemcached/csl/parser.cc" #ifdef short # undef short @@ -545,13 +547,13 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 193, 193, 194, 198, 200, 202, 204, 209, 214, - 218, 222, 233, 243, 253, 262, 266, 270, 274, 278, - 290, 294, 307, 320, 327, 334, 343, 349, 353, 357, - 361, 365, 369, 373, 377, 381, 385, 389, 393, 400, - 404, 408, 412, 416, 420, 424, 428, 432, 436, 440, - 444, 451, 452, 457, 458, 463, 467, 471, 475, 479, - 483, 487, 491, 495, 502, 506, 513, 517, 521 + 0, 195, 195, 196, 200, 202, 204, 206, 211, 216, + 220, 224, 235, 245, 255, 264, 268, 272, 276, 280, + 292, 296, 309, 322, 329, 336, 345, 351, 355, 359, + 363, 367, 371, 375, 379, 383, 387, 391, 395, 402, + 406, 410, 414, 418, 422, 426, 430, 434, 438, 442, + 446, 453, 454, 459, 460, 465, 469, 473, 477, 481, + 485, 489, 493, 497, 504, 508, 515, 519, 523 }; #endif @@ -1561,29 +1563,29 @@ yyreduce: { case 4: -/* Line 1806 of yacc.c */ -#line 199 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 201 "libmemcached/csl/parser.yy" { } break; case 5: -/* Line 1806 of yacc.c */ -#line 201 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 203 "libmemcached/csl/parser.yy" { } break; case 6: -/* Line 1806 of yacc.c */ -#line 203 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 205 "libmemcached/csl/parser.yy" { } break; case 7: -/* Line 1806 of yacc.c */ -#line 205 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 207 "libmemcached/csl/parser.yy" { context->set_end(); YYACCEPT; @@ -1592,8 +1594,8 @@ yyreduce: case 8: -/* Line 1806 of yacc.c */ -#line 210 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 212 "libmemcached/csl/parser.yy" { context->rc= MEMCACHED_PARSE_USER_ERROR; parser_abort(context, "ERROR called directly"); @@ -1602,8 +1604,8 @@ yyreduce: case 9: -/* Line 1806 of yacc.c */ -#line 215 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 217 "libmemcached/csl/parser.yy" { memcached_reset(context->memc); } @@ -1611,8 +1613,8 @@ yyreduce: case 10: -/* Line 1806 of yacc.c */ -#line 219 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 221 "libmemcached/csl/parser.yy" { yydebug= 1; } @@ -1620,8 +1622,8 @@ yyreduce: case 11: -/* Line 1806 of yacc.c */ -#line 223 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 225 "libmemcached/csl/parser.yy" { if ((context->rc= memcached_parse_configure_file(*context->memc, (yyvsp[(3) - (3)].string).c_str, (yyvsp[(3) - (3)].string).size)) != MEMCACHED_SUCCESS) { @@ -1632,8 +1634,8 @@ yyreduce: case 12: -/* Line 1806 of yacc.c */ -#line 234 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 236 "libmemcached/csl/parser.yy" { if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(3) - (4)].number), uint32_t((yyvsp[(4) - (4)].number))))) { @@ -1647,8 +1649,8 @@ yyreduce: case 13: -/* Line 1806 of yacc.c */ -#line 244 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 246 "libmemcached/csl/parser.yy" { if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(3) - (4)].number), uint32_t((yyvsp[(4) - (4)].number))))) { @@ -1662,8 +1664,8 @@ yyreduce: case 14: -/* Line 1806 of yacc.c */ -#line 254 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 256 "libmemcached/csl/parser.yy" { if (memcached_failed(context->rc= memcached_server_add_unix_socket_with_weight(context->memc, (yyvsp[(2) - (3)].string).c_str, uint32_t((yyvsp[(3) - (3)].number))))) { @@ -1676,8 +1678,8 @@ yyreduce: case 15: -/* Line 1806 of yacc.c */ -#line 263 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 265 "libmemcached/csl/parser.yy" { memcached_set_configuration_file(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).size); } @@ -1685,8 +1687,8 @@ yyreduce: case 16: -/* Line 1806 of yacc.c */ -#line 267 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 269 "libmemcached/csl/parser.yy" { context->memc->configure.initial_pool_size= uint32_t((yyvsp[(2) - (2)].number)); } @@ -1694,8 +1696,8 @@ yyreduce: case 17: -/* Line 1806 of yacc.c */ -#line 271 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 273 "libmemcached/csl/parser.yy" { context->memc->configure.max_pool_size= uint32_t((yyvsp[(2) - (2)].number)); } @@ -1703,8 +1705,8 @@ yyreduce: case 19: -/* Line 1806 of yacc.c */ -#line 279 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 281 "libmemcached/csl/parser.yy" { if (memcached_callback_get(context->memc, MEMCACHED_CALLBACK_PREFIX_KEY, NULL)) { @@ -1720,8 +1722,8 @@ yyreduce: case 20: -/* Line 1806 of yacc.c */ -#line 291 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 293 "libmemcached/csl/parser.yy" { memcached_flag(*context->memc, MEMCACHED_FLAG_IS_FETCHING_VERSION, true); } @@ -1729,8 +1731,8 @@ yyreduce: case 21: -/* Line 1806 of yacc.c */ -#line 295 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 297 "libmemcached/csl/parser.yy" { // Check to see if DISTRIBUTION has already been set if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (2)].distribution))) != MEMCACHED_SUCCESS) @@ -1747,8 +1749,8 @@ yyreduce: case 22: -/* Line 1806 of yacc.c */ -#line 308 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 310 "libmemcached/csl/parser.yy" { // Check to see if DISTRIBUTION has already been set if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (4)].distribution))) != MEMCACHED_SUCCESS) @@ -1765,8 +1767,8 @@ yyreduce: case 23: -/* Line 1806 of yacc.c */ -#line 321 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 323 "libmemcached/csl/parser.yy" { if (context->set_hash((yyvsp[(2) - (2)].hash)) == false) { @@ -1777,8 +1779,8 @@ yyreduce: case 24: -/* Line 1806 of yacc.c */ -#line 328 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 330 "libmemcached/csl/parser.yy" { if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (2)].behavior), (yyvsp[(2) - (2)].number))) != MEMCACHED_SUCCESS) { @@ -1789,8 +1791,8 @@ yyreduce: case 25: -/* Line 1806 of yacc.c */ -#line 335 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 337 "libmemcached/csl/parser.yy" { if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (1)].behavior), true)) != MEMCACHED_SUCCESS) { @@ -1803,16 +1805,16 @@ yyreduce: case 26: -/* Line 1806 of yacc.c */ -#line 344 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 346 "libmemcached/csl/parser.yy" { } break; case 27: -/* Line 1806 of yacc.c */ -#line 350 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 352 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS; } @@ -1820,8 +1822,8 @@ yyreduce: case 28: -/* Line 1806 of yacc.c */ -#line 354 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 356 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT; } @@ -1829,8 +1831,8 @@ yyreduce: case 29: -/* Line 1806 of yacc.c */ -#line 358 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 360 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK; } @@ -1838,8 +1840,8 @@ yyreduce: case 30: -/* Line 1806 of yacc.c */ -#line 362 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 364 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK; } @@ -1847,8 +1849,8 @@ yyreduce: case 31: -/* Line 1806 of yacc.c */ -#line 366 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 368 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH; } @@ -1856,8 +1858,8 @@ yyreduce: case 32: -/* Line 1806 of yacc.c */ -#line 370 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 372 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS; } @@ -1865,8 +1867,8 @@ yyreduce: case 33: -/* Line 1806 of yacc.c */ -#line 374 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 376 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT; } @@ -1874,8 +1876,8 @@ yyreduce: case 34: -/* Line 1806 of yacc.c */ -#line 378 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 380 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT; } @@ -1883,8 +1885,8 @@ yyreduce: case 35: -/* Line 1806 of yacc.c */ -#line 382 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 384 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT; } @@ -1892,8 +1894,8 @@ yyreduce: case 36: -/* Line 1806 of yacc.c */ -#line 386 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 388 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SND_TIMEOUT; } @@ -1901,8 +1903,8 @@ yyreduce: case 37: -/* Line 1806 of yacc.c */ -#line 390 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 392 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE; } @@ -1910,8 +1912,8 @@ yyreduce: case 38: -/* Line 1806 of yacc.c */ -#line 394 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 396 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE; } @@ -1919,8 +1921,8 @@ yyreduce: case 39: -/* Line 1806 of yacc.c */ -#line 401 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 403 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL; } @@ -1928,8 +1930,8 @@ yyreduce: case 40: -/* Line 1806 of yacc.c */ -#line 405 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 407 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS; } @@ -1937,8 +1939,8 @@ yyreduce: case 41: -/* Line 1806 of yacc.c */ -#line 409 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 411 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY; } @@ -1946,8 +1948,8 @@ yyreduce: case 42: -/* Line 1806 of yacc.c */ -#line 413 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 415 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_NOREPLY; } @@ -1955,8 +1957,8 @@ yyreduce: case 43: -/* Line 1806 of yacc.c */ -#line 417 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 419 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ; } @@ -1964,8 +1966,8 @@ yyreduce: case 44: -/* Line 1806 of yacc.c */ -#line 421 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 423 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SORT_HOSTS; } @@ -1973,8 +1975,8 @@ yyreduce: case 45: -/* Line 1806 of yacc.c */ -#line 425 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 427 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SUPPORT_CAS; } @@ -1982,8 +1984,8 @@ yyreduce: case 46: -/* Line 1806 of yacc.c */ -#line 429 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 431 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_NODELAY; } @@ -1991,8 +1993,8 @@ yyreduce: case 47: -/* Line 1806 of yacc.c */ -#line 433 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 435 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE; } @@ -2000,8 +2002,8 @@ yyreduce: case 48: -/* Line 1806 of yacc.c */ -#line 437 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 439 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE; } @@ -2009,8 +2011,8 @@ yyreduce: case 49: -/* Line 1806 of yacc.c */ -#line 441 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 443 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_USE_UDP; } @@ -2018,8 +2020,8 @@ yyreduce: case 50: -/* Line 1806 of yacc.c */ -#line 445 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 447 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_VERIFY_KEY; } @@ -2027,36 +2029,36 @@ yyreduce: case 51: -/* Line 1806 of yacc.c */ -#line 451 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 453 "libmemcached/csl/parser.yy" { (yyval.number)= MEMCACHED_DEFAULT_PORT;} break; case 52: -/* Line 1806 of yacc.c */ -#line 453 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 455 "libmemcached/csl/parser.yy" { } break; case 53: -/* Line 1806 of yacc.c */ -#line 457 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 459 "libmemcached/csl/parser.yy" { (yyval.number)= 1; } break; case 54: -/* Line 1806 of yacc.c */ -#line 459 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 461 "libmemcached/csl/parser.yy" { } break; case 55: -/* Line 1806 of yacc.c */ -#line 464 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 466 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_MD5; } @@ -2064,8 +2066,8 @@ yyreduce: case 56: -/* Line 1806 of yacc.c */ -#line 468 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 470 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_CRC; } @@ -2073,8 +2075,8 @@ yyreduce: case 57: -/* Line 1806 of yacc.c */ -#line 472 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 474 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_FNV1_64; } @@ -2082,8 +2084,8 @@ yyreduce: case 58: -/* Line 1806 of yacc.c */ -#line 476 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 478 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_FNV1A_64; } @@ -2091,8 +2093,8 @@ yyreduce: case 59: -/* Line 1806 of yacc.c */ -#line 480 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 482 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_FNV1_32; } @@ -2100,8 +2102,8 @@ yyreduce: case 60: -/* Line 1806 of yacc.c */ -#line 484 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 486 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_FNV1A_32; } @@ -2109,8 +2111,8 @@ yyreduce: case 61: -/* Line 1806 of yacc.c */ -#line 488 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 490 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_HSIEH; } @@ -2118,8 +2120,8 @@ yyreduce: case 62: -/* Line 1806 of yacc.c */ -#line 492 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 494 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_MURMUR; } @@ -2127,8 +2129,8 @@ yyreduce: case 63: -/* Line 1806 of yacc.c */ -#line 496 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 498 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_JENKINS; } @@ -2136,8 +2138,8 @@ yyreduce: case 64: -/* Line 1806 of yacc.c */ -#line 503 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 505 "libmemcached/csl/parser.yy" { (yyval.string)= (yyvsp[(1) - (1)].string); } @@ -2145,8 +2147,8 @@ yyreduce: case 65: -/* Line 1806 of yacc.c */ -#line 507 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 509 "libmemcached/csl/parser.yy" { (yyval.string)= (yyvsp[(1) - (1)].string); } @@ -2154,8 +2156,8 @@ yyreduce: case 66: -/* Line 1806 of yacc.c */ -#line 514 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 516 "libmemcached/csl/parser.yy" { (yyval.distribution)= MEMCACHED_DISTRIBUTION_CONSISTENT; } @@ -2163,8 +2165,8 @@ yyreduce: case 67: -/* Line 1806 of yacc.c */ -#line 518 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 520 "libmemcached/csl/parser.yy" { (yyval.distribution)= MEMCACHED_DISTRIBUTION_MODULA; } @@ -2172,8 +2174,8 @@ yyreduce: case 68: -/* Line 1806 of yacc.c */ -#line 522 "libmemcached/csl/parser.yy" +/* Line 1821 of yacc.c */ +#line 524 "libmemcached/csl/parser.yy" { (yyval.distribution)= MEMCACHED_DISTRIBUTION_RANDOM; } @@ -2181,8 +2183,8 @@ yyreduce: -/* Line 1806 of yacc.c */ -#line 2186 "libmemcached/csl/parser.cc" +/* Line 1821 of yacc.c */ +#line 2188 "libmemcached/csl/parser.cc" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2413,7 +2415,7 @@ yyreturn: /* Line 2067 of yacc.c */ -#line 527 "libmemcached/csl/parser.yy" +#line 529 "libmemcached/csl/parser.yy" void Context::start() diff --git a/libmemcached/csl/parser.yy b/libmemcached/csl/parser.yy index 71459bbe..486fb4b3 100644 --- a/libmemcached/csl/parser.yy +++ b/libmemcached/csl/parser.yy @@ -63,8 +63,10 @@ #endif #ifndef __INTEL_COMPILER +#ifndef __clang__ #pragma GCC diagnostic ignored "-Wlogical-op" #endif +#endif int conf_lex(YYSTYPE* lvalp, void* scanner); diff --git a/libmemcached/csl/scanner.cc b/libmemcached/csl/scanner.cc index 34adff2f..15cd46d6 100644 --- a/libmemcached/csl/scanner.cc +++ b/libmemcached/csl/scanner.cc @@ -77,6 +77,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -200,6 +201,11 @@ typedef void* yyscan_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 @@ -222,11 +228,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -244,7 +245,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -323,7 +324,7 @@ static void config__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanne YY_BUFFER_STATE config__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE config__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE config__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); +YY_BUFFER_STATE config__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); void *config_alloc (yy_size_t ,yyscan_t yyscanner ); void *config_realloc (void *,yy_size_t ,yyscan_t yyscanner ); @@ -374,7 +375,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; @@ -1102,7 +1103,7 @@ static yyconst flex_int16_t yy_chk[1815] = #define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM) #define YY_NO_INPUT 1 -#line 1106 "libmemcached/csl/scanner.cc" +#line 1107 "libmemcached/csl/scanner.cc" #define INITIAL 0 @@ -1131,8 +1132,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - int yy_n_chars; - int yyleng_r; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -1185,7 +1186,7 @@ FILE *config_get_out (yyscan_t yyscanner ); void config_set_out (FILE * out_str ,yyscan_t yyscanner ); -int config_get_leng (yyscan_t yyscanner ); +yy_size_t config_get_leng (yyscan_t yyscanner ); char *config_get_text (yyscan_t yyscanner ); @@ -1193,10 +1194,6 @@ int config_get_lineno (yyscan_t yyscanner ); void config_set_lineno (int line_number ,yyscan_t yyscanner ); -int config_get_column (yyscan_t yyscanner ); - -void config_set_column (int column_no ,yyscan_t yyscanner ); - YYSTYPE * config_get_lval (yyscan_t yyscanner ); void config_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); @@ -1241,7 +1238,7 @@ static int input (yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) +#define ECHO fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1252,7 +1249,7 @@ static int input (yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - unsigned n; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1344,7 +1341,7 @@ YY_DECL -#line 1348 "libmemcached/csl/scanner.cc" +#line 1345 "libmemcached/csl/scanner.cc" yylval = yylval_param; @@ -1787,7 +1784,7 @@ YY_RULE_SETUP #line 229 "libmemcached/csl/scanner.l" ECHO; YY_BREAK -#line 1791 "libmemcached/csl/scanner.cc" +#line 1788 "libmemcached/csl/scanner.cc" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1975,7 +1972,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -1989,7 +1986,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -2020,7 +2017,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, (size_t) num_to_read ); + yyg->yy_n_chars, num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } @@ -2146,7 +2143,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -2170,7 +2167,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) case EOB_ACT_END_OF_FILE: { if ( config_wrap(yyscanner ) ) - return EOF; + return 0; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; @@ -2428,7 +2425,7 @@ void config_pop_buffer_state (yyscan_t yyscanner) */ static void config_ensure_buffer_stack (yyscan_t yyscanner) { - int num_to_alloc; + yy_size_t num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { @@ -2526,12 +2523,11 @@ YY_BUFFER_STATE config__scan_string (yyconst char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE config__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE config__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; - yy_size_t n; - int i; + yy_size_t n, i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; @@ -2641,7 +2637,7 @@ FILE *config_get_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -int config_get_leng (yyscan_t yyscanner) +yy_size_t config_get_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; diff --git a/libmemcached/csl/scanner.h b/libmemcached/csl/scanner.h index 34c5a3ac..571360b2 100644 --- a/libmemcached/csl/scanner.h +++ b/libmemcached/csl/scanner.h @@ -81,6 +81,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -191,7 +192,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -235,7 +236,7 @@ void config_pop_buffer_state (yyscan_t yyscanner ); YY_BUFFER_STATE config__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE config__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE config__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); +YY_BUFFER_STATE config__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); void *config_alloc (yy_size_t ,yyscan_t yyscanner ); void *config_realloc (void *,yy_size_t ,yyscan_t yyscanner ); @@ -290,7 +291,7 @@ FILE *config_get_out (yyscan_t yyscanner ); void config_set_out (FILE * out_str ,yyscan_t yyscanner ); -int config_get_leng (yyscan_t yyscanner ); +yy_size_t config_get_leng (yyscan_t yyscanner ); char *config_get_text (yyscan_t yyscanner ); @@ -298,10 +299,6 @@ int config_get_lineno (yyscan_t yyscanner ); void config_set_lineno (int line_number ,yyscan_t yyscanner ); -int config_get_column (yyscan_t yyscanner ); - -void config_set_column (int column_no ,yyscan_t yyscanner ); - YYSTYPE * config_get_lval (yyscan_t yyscanner ); void config_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); @@ -370,6 +367,6 @@ extern int config_lex \ #line 229 "libmemcached/csl/scanner.l" -#line 374 "libmemcached/csl/scanner.h" +#line 371 "libmemcached/csl/scanner.h" #undef config_IN_HEADER #endif /* config_HEADER_H */