Changeset 2048
- Timestamp:
- 01/17/2008 10:27:47 AM (6 months ago)
- Files:
-
- trunk/src/fdevent.c (modified) (2 diffs)
- trunk/src/fdevent_select.c (modified) (1 diff)
- trunk/src/http_auth.c (modified) (6 diffs)
- trunk/src/lemon.c (modified) (7 diffs)
- trunk/src/lempar.c (modified) (5 diffs)
- trunk/src/log.c (modified) (1 diff)
- trunk/src/mod_sql_vhost_core.c (modified) (1 diff)
- trunk/src/plugin.c (modified) (1 diff)
- trunk/src/server.c (modified) (4 diffs)
- trunk/src/stat_cache.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/fdevent.c
r1867 r2048 341 341 342 342 int fdevent_poll(fdevents *ev, int timeout_ms) { 343 if (ev->poll == NULL) SEGFAULT("ev->poll is %p", ev->poll);343 if (ev->poll == NULL) SEGFAULT("ev->poll is %p", (void*) (intptr_t) ev->poll); 344 344 return ev->poll(ev, timeout_ms); 345 345 } … … 348 348 size_t i; 349 349 350 if (ev->get_revents == NULL) SEGFAULT("ev->get_revents is %p", ev->get_revents);350 if (ev->get_revents == NULL) SEGFAULT("ev->get_revents is %p", (void*) (intptr_t) ev->get_revents); 351 351 352 352 fdevent_revents_reset(revents); trunk/src/fdevent_select.c
r1653 r2048 55 55 /* we should be protected by max-fds, but you never know */ 56 56 #ifndef _WIN32 57 u_int i;58 57 assert(sock->fd < FD_SETSIZE); 59 58 #endif trunk/src/http_auth.c
r1990 r2048 488 488 * The password first, since that is what is most unknown 489 489 */ 490 MD5_Update(&ctx, pw, strlen(pw));490 MD5_Update(&ctx, (const unsigned char*) pw, strlen(pw)); 491 491 492 492 /* 493 493 * Then our magic string 494 494 */ 495 MD5_Update(&ctx, APR1_ID, strlen(APR1_ID));495 MD5_Update(&ctx, (const unsigned char*) APR1_ID, strlen(APR1_ID)); 496 496 497 497 /* 498 498 * Then the raw salt 499 499 */ 500 MD5_Update(&ctx, sp, sl);500 MD5_Update(&ctx, (const unsigned char*) sp, sl); 501 501 502 502 /* … … 504 504 */ 505 505 MD5_Init(&ctx1); 506 MD5_Update(&ctx1, pw, strlen(pw));507 MD5_Update(&ctx1, sp, sl);508 MD5_Update(&ctx1, pw, strlen(pw));506 MD5_Update(&ctx1, (const unsigned char*) pw, strlen(pw)); 507 MD5_Update(&ctx1, (const unsigned char*) sp, sl); 508 MD5_Update(&ctx1, (const unsigned char*) pw, strlen(pw)); 509 509 MD5_Final(final, &ctx1); 510 510 for (pl = strlen(pw); pl > 0; pl -= APR_MD5_DIGESTSIZE) { … … 526 526 } 527 527 else { 528 MD5_Update(&ctx, pw, 1);528 MD5_Update(&ctx, (const unsigned char*) pw, 1); 529 529 } 530 530 } … … 548 548 MD5_Init(&ctx1); 549 549 if (i & 1) { 550 MD5_Update(&ctx1, pw, strlen(pw));550 MD5_Update(&ctx1, (const unsigned char*) pw, strlen(pw)); 551 551 } 552 552 else { … … 554 554 } 555 555 if (i % 3) { 556 MD5_Update(&ctx1, sp, sl);556 MD5_Update(&ctx1, (const unsigned char*) sp, sl); 557 557 } 558 558 559 559 if (i % 7) { 560 MD5_Update(&ctx1, pw, strlen(pw));560 MD5_Update(&ctx1, (const unsigned char*) pw, strlen(pw)); 561 561 } 562 562 … … 565 565 } 566 566 else { 567 MD5_Update(&ctx1, pw, strlen(pw));567 MD5_Update(&ctx1, (const unsigned char*) pw, strlen(pw)); 568 568 } 569 569 MD5_Final(final,&ctx1); trunk/src/lemon.c
r1349 r2048 12 12 #include <ctype.h> 13 13 #include <stdlib.h> 14 #include <unistd.h> 14 15 15 16 extern void qsort(); … … 977 978 ** function won't work if apx->type==REDUCE and apy->type==SHIFT. 978 979 */ 979 static int resolve_conflict(apx,apy ,errsym)980 static int resolve_conflict(apx,apy) 980 981 struct action *apx; 981 982 struct action *apy; 982 struct symbol *errsym; /* The error symbol (if defined. NULL otherwise) */983 983 { 984 984 struct symbol *spx, *spy; … … 1327 1327 char **argv; 1328 1328 { 1329 ( (void) argc ); // UNUSED(argc) 1329 1330 static int version = 0; 1330 1331 static int rpflag = 0; … … 1652 1653 *((int*)op[j].arg) = v; 1653 1654 }else if( op[j].type==OPT_FFLAG ){ 1654 (*(void(*)())( op[j].arg))(v);1655 (*(void(*)())((intptr_t)op[j].arg))(v); 1655 1656 }else{ 1656 1657 if( err ){ … … 1734 1735 break; 1735 1736 case OPT_FDBL: 1736 (*(void(*)())( op[j].arg))(dv);1737 (*(void(*)())((intptr_t)op[j].arg))(dv); 1737 1738 break; 1738 1739 case OPT_INT: … … 1740 1741 break; 1741 1742 case OPT_FINT: 1742 (*(void(*)())( op[j].arg))((int)lv);1743 (*(void(*)())((intptr_t)op[j].arg))((int)lv); 1743 1744 break; 1744 1745 case OPT_STR: … … 1746 1747 break; 1747 1748 case OPT_FSTR: 1748 (*(void(*)())( op[j].arg))(sv);1749 (*(void(*)())((intptr_t)op[j].arg))(sv); 1749 1750 break; 1750 1751 } trunk/src/lempar.c
r1349 r2048 211 211 const char *ParseTokenName(int tokenType){ 212 212 #ifndef NDEBUG 213 if( tokenType>0 && tokenType<(sizeof(yyTokenName)/sizeof(yyTokenName[0])) ){213 if( tokenType>0 && ((unsigned int)tokenType)<(sizeof(yyTokenName)/sizeof(yyTokenName[0])) ){ 214 214 return yyTokenName[tokenType]; 215 215 }else{ … … 336 336 } 337 337 i += iLookAhead; 338 if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){338 if( i<0 || (unsigned int)i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){ 339 339 #ifdef YYFALLBACK 340 340 int iFallback; /* Fallback token */ … … 379 379 } 380 380 i += iLookAhead; 381 if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){381 if( i<0 || (unsigned int)i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){ 382 382 return yy_default[stateno]; 383 383 }else{ … … 457 457 #ifndef NDEBUG 458 458 if( yyTraceFILE && yyruleno>=0 459 && yyruleno<sizeof(yyRuleName)/sizeof(yyRuleName[0]) ){459 && (unsigned int) yyruleno<sizeof(yyRuleName)/sizeof(yyRuleName[0]) ){ 460 460 fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt, 461 461 yyRuleName[yyruleno]); … … 512 512 YYMINORTYPE yyminor /* The minor type of the error token */ 513 513 ){ 514 ( (void) yymajor ); 515 ( (void) yyminor ); 514 516 ParseARG_FETCH; 515 517 #define TOKEN (yyminor.yy0) trunk/src/log.c
r1959 r2048 322 322 va_end(ap); 323 323 324 if (l > -1 && l< b->size) {324 if (l > -1 && ((unsigned int) l) < b->size) { 325 325 b->used = l + 1; 326 326 trunk/src/mod_sql_vhost_core.c
r1885 r2048 334 334 #ifdef HAVE_GLIB_H 335 335 static gboolean cached_vhost_remove_expired(gpointer _key, gpointer _val, gpointer data) { 336 buffer *key = _key; 336 // buffer *key = _key; 337 UNUSED(_key); 337 338 cached_vhost *val = _val; 338 339 server *srv = data; trunk/src/plugin.c
r1832 r2048 299 299 #else 300 300 #if 1 301 init = (int (*)(plugin *)) dlsym(p->lib, srv->tmp_buf->ptr);301 init = (int (*)(plugin *))(intptr_t)dlsym(p->lib, srv->tmp_buf->ptr); 302 302 #else 303 303 *(void **)(&init) = dlsym(p->lib, srv->tmp_buf->ptr); trunk/src/server.c
r2010 r2048 114 114 case SIGTERM: 115 115 srv_shutdown = 1; 116 memcpy( &last_sigterm_info, si, sizeof(*si));116 memcpy((siginfo_t*) &last_sigterm_info, si, sizeof(*si)); 117 117 break; 118 118 case SIGINT: … … 123 123 } 124 124 125 memcpy( &last_sigterm_info, si, sizeof(*si));125 memcpy((siginfo_t*) &last_sigterm_info, si, sizeof(*si)); 126 126 127 127 break; … … 131 131 case SIGHUP: 132 132 handle_sig_hup = 1; 133 memcpy( &last_sighup_info, si, sizeof(*si));133 memcpy((siginfo_t*) &last_sighup_info, si, sizeof(*si)); 134 134 break; 135 135 case SIGCHLD: … … 1037 1037 GThread **stat_cache_threads; 1038 1038 GThread **aio_write_threads = NULL; 1039 #ifdef USE_LINUX_AIO_SENDFILE 1039 1040 GThread *linux_aio_read_thread_id = NULL; 1041 #endif 1040 1042 GThread * joblist_queue_thread_id = NULL; 1041 1043 GError *gerr = NULL; trunk/src/stat_cache.c
r1964 r2048 195 195 #ifdef HAVE_GLIB_H 196 196 gboolean stat_cache_free_hrfunc(gpointer _key, gpointer _value, gpointer _user_data) { 197 UNUSED(_user_data); 197 198 stat_cache_entry *sce = _value; 198 199 buffer *b = _key; … … 244 245 case STAT_CACHE_ENGINE_INOTIFY: 245 246 return stat_cache_handle_fdevent_inotify(_srv, _fce, revent); 247 #else 248 UNUSED(_fce); 249 UNUSED(revent); 246 250 #endif 247 251 default: … … 263 267 264 268 static int stat_cache_entry_is_current(server *srv, stat_cache_entry *sce) { 269 UNUSED(srv); 270 UNUSED(sce); 265 271 return 1; 266 272 }

