--------------------- PatchSet 11543 Date: 2007/07/20 21:20:49 Author: hno Branch: HEAD Tag: (none) Log: Bug #2023: Compile error with old GCC 2.x or other ANSI-C compilers before C99 The C standard before C99 requires all variables to be declared at the begining of a block, not between statements.. Members: src/HttpHeaderTools.c:1.40->1.41 Index: squid/src/HttpHeaderTools.c =================================================================== RCS file: /cvsroot/squid/squid/src/HttpHeaderTools.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- squid/src/HttpHeaderTools.c 15 Jul 2007 05:41:19 -0000 1.40 +++ squid/src/HttpHeaderTools.c 20 Jul 2007 21:20:49 -0000 1.41 @@ -1,6 +1,6 @@ /* - * $Id: HttpHeaderTools.c,v 1.40 2007/07/15 05:41:19 hno Exp $ + * $Id: HttpHeaderTools.c,v 1.41 2007/07/20 21:20:49 hno Exp $ * * DEBUG: section 66 HTTP Header Tools * AUTHOR: Alex Rousskov @@ -194,8 +194,9 @@ int strIsSubstr(const String * list, const char *s) { + const char *p; assert(list && s); - const char *p = strStr(*list, s); + p = strStr(*list, s); if (!p) return 0; if (strstr(p + 1, s) != NULL)