From: Automatic source maintenance Date: Tue, 28 Aug 2012 13:00:30 +0000 (-0600) Subject: SourceFormat Enforcement X-Git-Tag: sourceformat-review-1~64^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=37c6d8bac469396b1aef37435fdfaea24f47db1f;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/compat/GnuRegex.c b/compat/GnuRegex.c index d9cda4ec2e..8af45323b0 100644 --- a/compat/GnuRegex.c +++ b/compat/GnuRegex.c @@ -48,7 +48,6 @@ #include #endif - /* Define the syntax stuff for \<, \>, etc. */ /* This must be nonzero for the wordchar and notwordchar pattern @@ -105,7 +104,6 @@ init_syntax_once(void) * internal error. */ static int re_compile_fastmap(struct re_pattern_buffer * buffer); - /* Search in the string STRING (with length LENGTH) for the pattern * compiled into BUFFER. Start searching at position START, for RANGE * characters. Return the starting position of the match, -1 for no @@ -114,21 +112,18 @@ static int re_compile_fastmap(struct re_pattern_buffer * buffer); static int re_search(struct re_pattern_buffer * buffer, const char *string, int length, int start, int range, struct re_registers * regs); - /* Like `re_search', but search in the concatenation of STRING1 and * STRING2. Also, stop searching at index START + STOP. */ static int re_search_2(struct re_pattern_buffer * buffer, const char *string1, int length1, const char *string2, int length2, int start, int range, struct re_registers * regs, int stop); - /* Like `re_search_2', but return how many characters in STRING the regexp * in BUFFER matched, starting at position START. */ static int re_match_2(struct re_pattern_buffer * buffer, const char *string1, int length1, const char *string2, int length2, int start, struct re_registers * regs, int stop); - /* isalpha etc. are used for the character classes. */ #include @@ -215,7 +210,6 @@ char *alloca(); #endif /* not REGEX_MALLOC */ - /* True if `size1' is non-NULL and PTR is pointing anywhere inside * `string1' or just past its end. This works if PTR is NULL, which is * a good thing. */ @@ -457,7 +451,6 @@ static int debug = 0; #define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) \ if (debug) print_double_string (w, s1, sz1, s2, sz2) - extern void printchar(); /* Print the fastmap in human-readable form. */ @@ -486,7 +479,6 @@ char *fastmap; putchar('\n'); } - /* Print a compiled pattern string in human-readable form, starting at * the START pointer into it and ending just before the pointer END. */ @@ -663,7 +655,6 @@ unsigned char *end; printf("/\n"); } - void print_compiled_pattern(bufp) struct re_pattern_buffer *bufp; @@ -688,7 +679,6 @@ struct re_pattern_buffer *bufp; /* Perhaps we should print the translate table? */ } - void print_double_string(where, string1, size1, string2, size2) const char *where; @@ -772,14 +762,12 @@ static const char *re_error_msg[] = {NULL, /* REG_NOERROR */ /* Go backwards one character in the pattern. */ #define PATUNFETCH p-- - /* If `translate' is non-null, return translate[D], else just D. We * cast the subscript to translate because some data is declared as * `char *', to avoid warnings when a string constant is passed. But * when we use a character as a subscript we must make it unsigned. */ #define TRANSLATE(d) (translate ? translate[(unsigned char) (d)] : (d)) - /* Macros for outputting the compiled pattern into `buffer'. */ /* If the buffer isn't allocated when it comes in, use this. */ @@ -797,7 +785,6 @@ static const char *re_error_msg[] = {NULL, /* REG_NOERROR */ *b++ = (unsigned char) (c); \ } while (0) - /* Ensure we have two more bytes of buffer space and then append C1 and C2. */ #define BUF_PUSH_2(c1, c2) \ do { \ @@ -806,7 +793,6 @@ static const char *re_error_msg[] = {NULL, /* REG_NOERROR */ *b++ = (unsigned char) (c2); \ } while (0) - /* As with BUF_PUSH_2, except for three bytes. */ #define BUF_PUSH_3(c1, c2, c3) \ do { \ @@ -816,7 +802,6 @@ static const char *re_error_msg[] = {NULL, /* REG_NOERROR */ *b++ = (unsigned char) (c3); \ } while (0) - /* Store a jump with opcode OP at LOC to location TO. We store a * relative address offset by the three bytes the jump itself occupies. */ #define STORE_JUMP(op, loc, to) \ @@ -834,13 +819,11 @@ static const char *re_error_msg[] = {NULL, /* REG_NOERROR */ #define INSERT_JUMP2(op, loc, to, arg) \ insert_op2 (op, loc, (to) - (loc) - 3, arg, b) - /* This is not an arbitrary limit: the arguments which represent offsets * into the pattern are two bytes long. So if 2^16 bytes turns out to * be too small, many things would have to change. */ #define MAX_BUF_SIZE (1L << 16) - /* Extend the buffer by twice its current size via realloc and * reset the pointers that pointed into the old block to point to the * correct places in the new one. If extending the buffer results in it @@ -870,7 +853,6 @@ static const char *re_error_msg[] = {NULL, /* REG_NOERROR */ } \ } while (0) - /* Since we have one byte reserved for the register number argument to * {start,stop}_memory, the maximum number of groups we can report * things about is what fits in that byte. */ @@ -880,7 +862,6 @@ static const char *re_error_msg[] = {NULL, /* REG_NOERROR */ * ignore the excess. */ typedef unsigned regnum_t; - /* Macros for the compile stack. */ /* Since offsets can go either forwards or backwards, this type needs to @@ -895,7 +876,6 @@ typedef struct { regnum_t regnum; } compile_stack_elt_t; - typedef struct { compile_stack_elt_t *stack; unsigned size; @@ -919,13 +899,11 @@ static reg_errcode_t compile_range(const char **p_ptr, const char *pend, char *t /* The next available element. */ #define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail]) - /* Set the bit for character C in a list. */ #define SET_LIST_BIT(c) \ (b[((unsigned char) (c)) / BYTEWIDTH] \ |= 1 << (((unsigned char) c) % BYTEWIDTH)) - /* Get the next unsigned number in the uncompiled pattern. */ #define GET_UNSIGNED_NUMBER(num) \ { if (p != pend) \ @@ -1093,7 +1071,6 @@ regex_compile(const char *pattern, int size, reg_syntax_t syntax, struct re_patt } break; - case '$': { if ( /* If at end of pattern, it's an operator. */ p == pend @@ -1107,7 +1084,6 @@ regex_compile(const char *pattern, int size, reg_syntax_t syntax, struct re_patt } break; - case '+': case '?': if ((syntax & RE_BK_PLUS_QM) @@ -1226,13 +1202,11 @@ handle_plus: } break; - case '.': laststart = b; BUF_PUSH(anychar); break; - case '[': { boolean had_char_class = false; @@ -1402,42 +1376,36 @@ handle_plus: } break; - case '(': if (syntax & RE_NO_BK_PARENS) goto handle_open; else goto normal_char; - case ')': if (syntax & RE_NO_BK_PARENS) goto handle_close; else goto normal_char; - case '\n': if (syntax & RE_NEWLINE_ALT) goto handle_alt; else goto normal_char; - case '|': if (syntax & RE_NO_BK_VBAR) goto handle_alt; else goto normal_char; - case '{': if (syntax & RE_INTERVALS && syntax & RE_NO_BK_BRACES) goto handle_interval; else goto normal_char; - case '\\': if (p == pend) return REG_EESCAPE; @@ -1493,7 +1461,6 @@ handle_open: pending_exact = 0; break; - case ')': if (syntax & RE_NO_BK_PARENS) goto normal_backslash; @@ -1557,7 +1524,6 @@ handle_close: } break; - case '|': /* `\|'. */ if (syntax & RE_LIMITED_OPS || syntax & RE_NO_BK_VBAR) goto normal_backslash; @@ -1602,7 +1568,6 @@ handle_alt: begalt = b; break; - case '{': /* If \{ is a literal. */ if (!(syntax & RE_INTERVALS) @@ -1756,19 +1721,16 @@ unfetch_interval: } goto normal_char; - case 'w': laststart = b; BUF_PUSH(wordchar); break; - case 'W': laststart = b; BUF_PUSH(notwordchar); break; - case '<': BUF_PUSH(wordbeg); break; @@ -1818,7 +1780,6 @@ unfetch_interval: BUF_PUSH_2(duplicate, c1); break; - case '+': case '?': if (syntax & RE_BK_PLUS_QM) @@ -1836,7 +1797,6 @@ normal_backslash: } break; - default: /* Expects the character in `c'. */ normal_char: @@ -1871,7 +1831,6 @@ normal_char: } /* switch (c) */ } /* while p != pend */ - /* Through the pattern now. */ if (fixup_alt_jump) @@ -1905,7 +1864,6 @@ void store_op1(re_opcode_t op, unsigned char *loc, int arg) STORE_NUMBER(loc + 1, arg); } - /* Like `store_op1', but for two two-byte parameters ARG1 and ARG2. */ void @@ -1916,7 +1874,6 @@ store_op2( re_opcode_t op, unsigned char *loc, int arg1, int arg2) STORE_NUMBER(loc + 3, arg2); } - /* Copy the bytes from LOC to END to open up three bytes of space at LOC * for OP followed by two-byte integer parameter ARG. */ @@ -1932,7 +1889,6 @@ insert_op1(re_opcode_t op, unsigned char *loc, int arg, unsigned char *end) store_op1(op, loc, arg); } - /* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2. */ void @@ -1947,7 +1903,6 @@ insert_op2(re_opcode_t op, unsigned char *loc, int arg1, int arg2, unsigned char store_op2(op, loc, arg1, arg2); } - /* P points to just after a ^ in PATTERN. Return true if that ^ comes * after an alternative or a begin-subexpression. We assume there is at * least one character before the ^. */ @@ -1965,7 +1920,6 @@ at_begline_loc_p(const char * pattern, const char *p, reg_syntax_t syntax) || (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash)); } - /* The dual of at_begline_loc_p. This one is for $. We assume there is * at least one character after the $, i.e., `P < PEND'. */ @@ -1985,7 +1939,6 @@ at_endline_loc_p(const char *p, const char *pend, int syntax) : next_backslash && next_next && *next_next == '|'); } - /* Returns true if REGNUM is in one of COMPILE_STACK's elements and * false if it's not. */ @@ -2003,7 +1956,6 @@ group_in_compile_stack(compile_stack_type compile_stack, regnum_t regnum) return false; } - /* Read the ending character of a range (in a bracket expression) from the * uncompiled pattern *P_PTR (which ends at PEND). We assume the * starting character is in `P[-2]'. (`P[-1]' is the character `-'.) @@ -2059,7 +2011,6 @@ compile_range(const char **p_ptr, const char *pend, char *translate, reg_syntax_ * re_match_2 use a failure stack. These have to be macros because of * REGEX_ALLOCATE. */ - /* Number of failure points for which to initially allocate space * when matching. If this number is exceeded, we allocate more * space, so it is not a hard limit. */ @@ -2086,7 +2037,6 @@ typedef struct { #define FAIL_STACK_FULL() (fail_stack.avail == fail_stack.size) #define FAIL_STACK_TOP() (fail_stack.stack[fail_stack.avail]) - /* Initialize `fail_stack'. Do `return -2' if the alloc fails. */ #define INIT_FAIL_STACK() \ @@ -2101,7 +2051,6 @@ typedef struct { fail_stack.avail = 0; \ } while (0) - /* Double the size of FAIL_STACK, up to approximately `re_max_failures' items. * * Return 1 if succeeds, and 0 if either ran out of memory @@ -2122,7 +2071,6 @@ typedef struct { : ((fail_stack).size <<= 1, \ 1))) - /* Push PATTERN_OP on FAIL_STACK. * * Return 1 if was able to do so and 0 if ran out of memory allocating @@ -2152,7 +2100,6 @@ typedef struct { #define DEBUG_POP(item_addr) #endif - /* Push the information about the state we will need * if we ever fail back to it. * @@ -2258,7 +2205,6 @@ typedef struct { /* How many items can still be added to the stack without overflowing it. */ #define REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail) - /* Pops what PUSH_FAIL_STACK pushes. * * We restore into the parameters, all of which should be lvalues: @@ -2407,7 +2353,6 @@ struct re_pattern_buffer *bufp; bufp->can_be_null = 1; return 0; - /* Following are the cases which match a character. These end * with `break'. */ @@ -2415,14 +2360,12 @@ struct re_pattern_buffer *bufp; fastmap[p[1]] = 1; break; - case charset: for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--) if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH))) fastmap[j] = 1; break; - case charset_not: /* Chars beyond end of map must be allowed. */ for (j = *p * BYTEWIDTH; j < (1 << BYTEWIDTH); j++) @@ -2433,21 +2376,18 @@ struct re_pattern_buffer *bufp; fastmap[j] = 1; break; - case wordchar: for (j = 0; j < (1 << BYTEWIDTH); j++) if (SYNTAX(j) == Sword) fastmap[j] = 1; break; - case notwordchar: for (j = 0; j < (1 << BYTEWIDTH); j++) if (SYNTAX(j) != Sword) fastmap[j] = 1; break; - case anychar: /* `.' matches anything ... */ for (j = 0; j < (1 << BYTEWIDTH); j++) @@ -2465,7 +2405,6 @@ struct re_pattern_buffer *bufp; /* Otherwise, have to check alternative paths. */ break; - case no_op: case begline: case endline: @@ -2478,7 +2417,6 @@ struct re_pattern_buffer *bufp; case push_dummy_failure: continue; - case jump_n: case pop_failure_jump: case maybe_pop_jump: @@ -2510,7 +2448,6 @@ struct re_pattern_buffer *bufp; continue; - case on_failure_jump: case on_failure_keep_string_jump: handle_on_failure_jump: @@ -2535,7 +2472,6 @@ handle_on_failure_jump: } continue; - case succeed_n: /* Get to the number of times to succeed. */ p += 2; @@ -2549,18 +2485,15 @@ handle_on_failure_jump: } continue; - case set_number_at: p += 4; continue; - case start_memory: case stop_memory: p += 2; continue; - default: abort(); /* We have listed all the cases. */ } /* switch *p++ */ @@ -2597,7 +2530,6 @@ struct re_registers *regs; regs, size); } - /* Using the compiled pattern in BUFP->buffer, first tries to match the * virtual concatenation of STRING1 and STRING2, starting first at index * STARTPOS, then at STARTPOS + 1, and so on. @@ -2759,7 +2691,6 @@ static boolean group_match_null_string_p(unsigned char **p, unsigned char *end, #define MATCHED_SOMETHING(R) ((R).bits.matched_something) #define EVER_MATCHED_SOMETHING(R) ((R).bits.ever_matched_something) - /* Call this when have matched a real character; it sets `matched' flags * for the subexpressions which we are currently inside. Also records * that those subexprs have matched. */ @@ -2776,7 +2707,6 @@ static boolean group_match_null_string_p(unsigned char **p, unsigned char *end, } \ while (0) - /* This converts PTR, a pointer into one of the search strings `string1' * and `string2' into an offset from the beginning of that string. */ #define POINTER_TO_OFFSET(ptr) \ @@ -2786,7 +2716,6 @@ static boolean group_match_null_string_p(unsigned char **p, unsigned char *end, #define REG_UNSET_VALUE ((char *) -1) #define REG_UNSET(e) ((e) == REG_UNSET_VALUE) - /* Macros for dealing with the split strings in re_match_2. */ #define MATCHING_IN_FIRST_STRING (dend == end_match_1) @@ -2804,13 +2733,11 @@ static boolean group_match_null_string_p(unsigned char **p, unsigned char *end, dend = end_match_2; \ } - /* Test if at very beginning or at very end of the virtual concatenation * of `string1' and `string2'. If only one string, it's `string2'. */ #define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2) #define AT_STRINGS_END(d) ((d) == end2) - /* Test if D points to a character which is word-constituent. We have * two special cases to check for: if past the end of string1, look at * the first character in string2; and if before the beginning of @@ -2826,7 +2753,6 @@ static boolean group_match_null_string_p(unsigned char **p, unsigned char *end, (AT_STRINGS_BEG (d) || AT_STRINGS_END (d) \ || WORDCHAR_P (d - 1) != WORDCHAR_P (d)) - /* Free everything we malloc. */ #ifdef REGEX_MALLOC #define FREE_VAR(var) if (var) free (var); var = NULL @@ -2848,7 +2774,6 @@ static boolean group_match_null_string_p(unsigned char **p, unsigned char *end, #define FREE_VARIABLES() alloca (0) #endif /* not REGEX_MALLOC */ - /* These values must meet several constraints. They must not be valid * register values; since we have a limit of 255 registers (because * we use only one byte in the pattern for the register number), we can @@ -3207,7 +3132,6 @@ restore_best_regs: DEBUG_PRINT1("EXECUTING no_op.\n"); break; - /* Match the next n pattern characters exactly. The following * byte in the pattern defines n, and the n bytes after that * are the characters to match. */ @@ -3233,7 +3157,6 @@ restore_best_regs: SET_REGS_MATCHED(); break; - /* Match any character except possibly a newline or a null. */ case anychar: DEBUG_PRINT1("EXECUTING anychar.\n"); @@ -3249,7 +3172,6 @@ restore_best_regs: d++; break; - case charset: case charset_not: { register unsigned char c; @@ -3276,7 +3198,6 @@ restore_best_regs: break; } - /* The beginning of a group is represented by start_memory. * The arguments are the register number in the next byte, and the * number of groups inner to this one in the next. The text @@ -3321,7 +3242,6 @@ restore_best_regs: p += 2; break; - /* The stop_memory opcode represents the end of a group. Its * arguments are the same as start_memory's: the register * number, and the number of inner groups. */ @@ -3444,7 +3364,6 @@ restore_best_regs: p += 2; break; - /* \ has been turned into a `duplicate' command which is * followed by the numeric value of as the register number. */ case duplicate: { @@ -3506,7 +3425,6 @@ restore_best_regs: } break; - /* begline matches the empty string at the beginning of the string * (unless `not_bol' is set in `bufp'), and, if * `newline_anchor' is set, after newlines. */ @@ -3522,7 +3440,6 @@ restore_best_regs: /* In all other cases, we fail. */ goto fail; - /* endline is the dual of begline. */ case endline: DEBUG_PRINT1("EXECUTING endline.\n"); @@ -3538,7 +3455,6 @@ restore_best_regs: } goto fail; - /* Match at the very beginning of the data. */ case begbuf: DEBUG_PRINT1("EXECUTING begbuf.\n"); @@ -3546,7 +3462,6 @@ restore_best_regs: break; goto fail; - /* Match at the very end of the data. */ case endbuf: DEBUG_PRINT1("EXECUTING endbuf.\n"); @@ -3554,7 +3469,6 @@ restore_best_regs: break; goto fail; - /* on_failure_keep_string_jump is used to optimize `.*\n'. It * pushes NULL as the value for the string on the stack. Then * `pop_failure_point' will keep the current value for the @@ -3580,7 +3494,6 @@ restore_best_regs: PUSH_FAILURE_POINT(p + mcnt, NULL, -2); break; - /* Uses of on_failure_jump: * * Each alternative starts with an on_failure_jump that points @@ -3631,7 +3544,6 @@ on_failure: PUSH_FAILURE_POINT(p + mcnt, d, -2); break; - /* A smart repeat ends with `maybe_pop_jump'. * We change it to either `pop_failure_jump' or `jump'. */ case maybe_pop_jump: @@ -3705,7 +3617,6 @@ on_failure: } /* Note fall through. */ - /* The end of a simple repeat has a pop_failure_jump back to * its matching on_failure_jump, where the latter will push a * failure point. The pop_failure_jump takes off failure @@ -3732,7 +3643,6 @@ on_failure: } /* Note fall through. */ - /* Unconditionally jump (without popping any failure points). */ case jump: unconditional_jump: @@ -3742,14 +3652,12 @@ unconditional_jump: DEBUG_PRINT2("(to 0x%x).\n", p); break; - /* We need this opcode so we can detect where alternatives end * in `group_match_null_string_p' et al. */ case jump_past_alt: DEBUG_PRINT1("EXECUTING jump_past_alt.\n"); goto unconditional_jump; - /* Normally, the on_failure_jump pushes a failure point, which * then gets popped at pop_failure_jump. We will end up at * pop_failure_jump, also, and with a pattern of, say, `a+', we @@ -3762,7 +3670,6 @@ unconditional_jump: PUSH_FAILURE_POINT(0, 0, -2); goto unconditional_jump; - /* At the end of an alternative, we need to push a dummy failure * point in case we are followed by a `pop_failure_jump', because * we don't want the failure point for the alternative to be @@ -3870,7 +3777,6 @@ unconditional_jump: } continue; /* Successfully executed one pattern command; keep going. */ - /* We goto here if a matching operation fails. */ fail: if (!FAIL_STACK_EMPTY()) { /* A restart point is known. Restore to that state. */ @@ -3971,7 +3877,6 @@ group_match_null_string_p(unsigned char **p, unsigned char *end, register_info_t * So, we have to first go through the first (n-1) * alternatives and then deal with the last one separately. */ - /* Deal with the first (n-1) alternatives, which start * with an on_failure_jump (see above) that jumps to right * past a jump_past_alt. */ @@ -4017,13 +3922,11 @@ group_match_null_string_p(unsigned char **p, unsigned char *end, register_info_t } /* if mcnt > 0 */ break; - case stop_memory: assert(p1[1] == **p); *p = p1 + 2; return true; - default: if (!common_op_match_null_string_p(&p1, end, reg_info)) return false; @@ -4033,7 +3936,6 @@ group_match_null_string_p(unsigned char **p, unsigned char *end, register_info_t return false; } /* group_match_null_string_p */ - /* Similar to group_match_null_string_p, but doesn't deal with alternatives: * It expects P to be the first byte of a single alternative and END one * byte past the last. The alternative can contain groups. */ @@ -4065,7 +3967,6 @@ alt_match_null_string_p(unsigned char *p, unsigned char *end, register_info_type return true; } /* alt_match_null_string_p */ - /* Deals with the ops common to group_match_null_string_p and * alt_match_null_string_p. * @@ -4145,7 +4046,6 @@ common_op_match_null_string_p( unsigned char **p, unsigned char *end, register_i return true; } /* common_op_match_null_string_p */ - /* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN * bytes; nonzero otherwise. */ @@ -4163,7 +4063,6 @@ bcmp_translate(unsigned char const *s1, unsigned char const*s2, register int len /* Entry points for GNU code. */ - /* POSIX.2 functions */ /* regcomp takes a regular expression as a string and compiles it. @@ -4257,7 +4156,6 @@ int cflags; return (int) ret; } - /* regexec searches for a given pattern, specified by PREG, in the * string STRING. * @@ -4326,7 +4224,6 @@ int eflags; return ret >= 0 ? (int) REG_NOERROR : (int) REG_NOMATCH; } - /* Returns a message corresponding to an error code, ERRCODE, returned * from either regcomp or regexec. We don't use PREG here. */ @@ -4363,7 +4260,6 @@ regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) return msg_size; } - /* Free dynamically allocated space used by PREG. */ void diff --git a/compat/GnuRegex.h b/compat/GnuRegex.h index 483c3a5855..cced650bcc 100644 --- a/compat/GnuRegex.h +++ b/compat/GnuRegex.h @@ -15,7 +15,6 @@ #include #endif - #else /* USE_GNUREGEX */ #ifdef __cplusplus @@ -144,7 +143,6 @@ extern "C" { * If not set, then an unmatched ) is invalid. */ #define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) - /* Define combinations of the above bits for the standard possibilities. * (The [[[ comments delimit what gets put into the Texinfo file, so * don't delete them!) */ @@ -216,7 +214,6 @@ extern "C" { #endif #define RE_DUP_MAX ((1 << 15) - 1) - /* POSIX `cflags' bits (i.e., information for `regcomp'). */ /* If this bit is set, then use extended regular expression syntax. @@ -236,7 +233,6 @@ extern "C" { * If not set, then returns differ between not matching and errors. */ #define REG_NOSUB (REG_NEWLINE << 1) - /* POSIX `eflags' bits (i.e., information for regexec). */ /* If this bit is set, then the beginning-of-line operator doesn't match @@ -249,7 +245,6 @@ extern "C" { /* Like REG_NOTBOL, except for the end-of-line. */ #define REG_NOTEOL (1 << 1) - /* If any error codes are removed, changed, or added, update the * `re_error_msg' table in regex.c. */ typedef enum { @@ -352,7 +347,6 @@ extern "C" { typedef struct re_pattern_buffer regex_t; - /* search.c (search_buffer) in Emacs needs this one opcode value. It is * defined both in `regex.c' and here. */ #define RE_EXACTN_VALUE 1 @@ -360,7 +354,6 @@ extern "C" { /* Type for byte offsets within the string. POSIX mandates this. */ typedef int regoff_t; - /* This is the structure we store register match data in. See * regex.texinfo for a full description of what registers match. */ struct re_registers { @@ -369,7 +362,6 @@ extern "C" { regoff_t *end; }; - /* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, * `re_match_2' returns information about at least this many registers * the first time a `regs' structure is passed. */ @@ -377,7 +369,6 @@ extern "C" { #define RE_NREGS 30 #endif - /* POSIX specification for registers. Aside from the different names than * `re_registers', POSIX uses an array of structures, instead of a * structure of arrays. */ diff --git a/compat/cmsg.h b/compat/cmsg.h index b299d31b58..17d63be04a 100644 --- a/compat/cmsg.h +++ b/compat/cmsg.h @@ -67,7 +67,6 @@ struct msghdr { int msg_flags; /* Flags on received message. */ }; - struct iovec { void *iov_base; size_t iov_len; @@ -79,7 +78,6 @@ struct sockaddr_un { # define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \ + strlen ((ptr)->sun_path)) - #endif /* CMSG_SPACE */ #ifndef SCM_RIGHTS diff --git a/compat/compat.h b/compat/compat.h index 35fea545eb..6cb68d5423 100644 --- a/compat/compat.h +++ b/compat/compat.h @@ -15,7 +15,6 @@ * squid.h at the top line of your .cc file. */ - /******************************************************/ /* Define the _SQUID_TYPE_ based on a guess of the OS */ /* NP: this MUST come first within compat.h */ @@ -35,15 +34,12 @@ #endif #endif - - /*****************************************************/ /* FDSETSIZE is messy and needs to be done before */ /* sys/types.h are defined. */ /*****************************************************/ #include "compat/fdsetsize.h" - /*****************************************************/ /* Global type re-definitions */ /* this also takes care of the basic system includes */ @@ -76,7 +72,6 @@ #include "compat/os/sunos.h" #include "compat/os/windows.h" - /*****************************************************/ /* portabilities shared between all platforms and */ /* components as found to be needed */ @@ -89,7 +84,6 @@ /* cstdio has a bunch of problems with 64-bit definitions */ #include "compat/stdio.h" - /*****************************************************/ /* component-specific portabilities */ /*****************************************************/ diff --git a/compat/compat_shared.h b/compat/compat_shared.h index f7db82b932..db7439a2db 100644 --- a/compat/compat_shared.h +++ b/compat/compat_shared.h @@ -86,8 +86,6 @@ extern void (*failure_notify) (const char *); # error Unknown select loop model! #endif - - #if !HAVE_STRUCT_RUSAGE /** * If we don't have getrusage() then we create a fake structure @@ -103,7 +101,6 @@ struct rusage { }; #endif /* !HAVE_STRUCT_RUSAGE */ - #ifndef min #ifdef __cplusplus /** @@ -151,7 +148,6 @@ max(A const & lhs, A const & rhs) */ #define w_space " \t\n\r" - #ifndef SQUID_NONBLOCK /* REQUIRED for the below logics. If they move this needs to as well */ #if HAVE_FCNTL_H @@ -192,7 +188,6 @@ max(A const & lhs, A const & rhs) #define SA_RESETHAND SA_ONESHOT #endif - /** * com_err.h is a C header and needs explicit shielding, but not * all other system headers including this care to do so. diff --git a/compat/cppunit.h b/compat/cppunit.h index 55ba6581d1..8062c4f511 100644 --- a/compat/cppunit.h +++ b/compat/cppunit.h @@ -28,7 +28,6 @@ private: /* dummy typedef so that the macro can still end with ';'*/ \ typedef int CppUnitDummyTypedefForSemiColonEnding__ - #endif /* HAVE_UNIQUE_PTR */ #endif /* HAVE_CPPUNIT_EXTENSIONS_HELPERMACROS_H */ #endif /* SQUID_COMPAT_CPPUNIT_H */ diff --git a/compat/debug.h b/compat/debug.h index b262c28964..312eae1fa8 100644 --- a/compat/debug.h +++ b/compat/debug.h @@ -17,7 +17,6 @@ SQUIDCEXTERN int debug_enabled; /* the macro overload style is really a gcc-ism */ #ifdef __GNUC__ - #define debug(X...) \ if (debug_enabled) { \ fprintf(stderr, "%s(%d): pid=%ld :", __FILE__, __LINE__, (long)getpid() ); \ @@ -30,5 +29,4 @@ SQUIDCEXTERN int debug_enabled; void debug(const char *format,...); #endif - #endif /* COMPAT_DEBUG_H */ diff --git a/compat/fdsetsize.h b/compat/fdsetsize.h index e46d929b7a..25909de2ba 100644 --- a/compat/fdsetsize.h +++ b/compat/fdsetsize.h @@ -77,7 +77,6 @@ #define FD_SETSIZE SQUID_MAXFD #endif - /* * Trap unintentional use of fd_set. Must not be used outside the * select code as it only supports FD_SETSIZE number of filedescriptors diff --git a/compat/getnameinfo.h b/compat/getnameinfo.h index 053294504f..fdae035619 100644 --- a/compat/getnameinfo.h +++ b/compat/getnameinfo.h @@ -16,6 +16,5 @@ SQUIDCEXTERN int xgetnameinfo(const struct sockaddr *sa, int flags ); #define getnameinfo xgetnameinfo - #endif /* HAVE_GETNAMEINFO */ #endif /* _getnameinfo_h */ diff --git a/compat/os/aix.h b/compat/os/aix.h index 8a540ae9d6..079194ae8a 100644 --- a/compat/os/aix.h +++ b/compat/os/aix.h @@ -9,7 +9,6 @@ *--------------------------------------------------------------------------* ****************************************************************************/ - /* * Syslog facility on AIX requires some portability wrappers */ @@ -18,6 +17,5 @@ #define _XOPEN_SOURCE_EXTENDED 1 #endif - #endif /* _SQUID_AIX_ */ #endif /* SQUID_OS_AIX_H */ diff --git a/compat/os/freebsd.h b/compat/os/freebsd.h index 531e378e5b..3990d5af6b 100644 --- a/compat/os/freebsd.h +++ b/compat/os/freebsd.h @@ -9,7 +9,6 @@ *--------------------------------------------------------------------------* ****************************************************************************/ - #if USE_ASYNC_IO && defined(LINUXTHREADS) #define _SQUID_LINUX_THREADS_ #endif @@ -32,6 +31,5 @@ //#define s6_addr16 __u6_addr.__u6_addr16 #define s6_addr32 __u6_addr.__u6_addr32 - #endif /* _SQUID_FREEBSD_ */ #endif /* SQUID_OS_FREEBSD_H */ diff --git a/compat/os/hpux.h b/compat/os/hpux.h index a90e4b2a09..6e05d4b96e 100644 --- a/compat/os/hpux.h +++ b/compat/os/hpux.h @@ -9,7 +9,6 @@ *--------------------------------------------------------------------------* ****************************************************************************/ - #if !defined(HAVE_GETPAGESIZE) #define HAVE_GETPAGESIZE #define getpagesize( ) sysconf(_SC_PAGE_SIZE) diff --git a/compat/os/linux.h b/compat/os/linux.h index a5261dc4d3..da5111d7d8 100644 --- a/compat/os/linux.h +++ b/compat/os/linux.h @@ -9,7 +9,6 @@ *--------------------------------------------------------------------------* ****************************************************************************/ - #if USE_ASYNC_IO #define _SQUID_LINUX_THREADS_ #endif @@ -22,7 +21,6 @@ #define HAVE_RES_INIT HAVE___RES_INIT #endif - /* * sys/capability.h is only needed in Linux apparently. * diff --git a/compat/os/next.h b/compat/os/next.h index 7fd8240d8f..81dd83313a 100644 --- a/compat/os/next.h +++ b/compat/os/next.h @@ -9,7 +9,6 @@ *--------------------------------------------------------------------------* ****************************************************************************/ - /* * Don't allow inclusion of malloc.h */ diff --git a/compat/os/opensolaris_10_netdb.h b/compat/os/opensolaris_10_netdb.h index 74c620b76a..77ac502615 100644 --- a/compat/os/opensolaris_10_netdb.h +++ b/compat/os/opensolaris_10_netdb.h @@ -104,7 +104,6 @@ extern "C" { #define h_addr h_addr_list[0] /* address, for backward compatiblity */ }; - /* * addrinfo introduced with IPv6 for Protocol-Independent Hostname * and Service Name Translation. @@ -125,7 +124,6 @@ extern "C" { struct addrinfo *ai_next; /* next structure in linked list */ }; - /* addrinfo flags */ #define AI_PASSIVE 0x0008 /* intended for bind() + listen() */ #define AI_CANONNAME 0x0010 /* return canonical version of host */ @@ -137,7 +135,6 @@ extern "C" { #define AI_ALL 0x0002 /* IPv6 and IPv4 mapped addresses */ #define AI_ADDRCONFIG 0x0004 /* AAAA or A records only if IPv6/IPv4 cnfg'd */ - /* * These were defined in RFC 2553 but not SUSv3 * or RFC 3493 which obsoleted 2553. @@ -185,7 +182,6 @@ extern "C" { */ #define SCOPE_DELIMITER '%' - /* * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols * and algorithms. diff --git a/compat/os/os2.h b/compat/os/os2.h index 72d943a321..400cbd58c0 100644 --- a/compat/os/os2.h +++ b/compat/os/os2.h @@ -15,6 +15,5 @@ * need to be overridden. */ - #endif /* _SQUID_OS2_ */ #endif /* SQUID_OS_OS2_H */ diff --git a/compat/os/qnx.h b/compat/os/qnx.h index 1242e74e3a..f83a3e37b8 100644 --- a/compat/os/qnx.h +++ b/compat/os/qnx.h @@ -14,6 +14,5 @@ */ #include - #endif /* _SQUID_QNX_ */ #endif /* SQUID_OS_QNX_H */ diff --git a/compat/os/solaris.h b/compat/os/solaris.h index ef5a722a58..793e266249 100644 --- a/compat/os/solaris.h +++ b/compat/os/solaris.h @@ -1,7 +1,6 @@ #ifndef SQUID_OS_SOLARIS_H #define SQUID_OS_SOLARIS_H - #if _SQUID_SOLARIS_ /* diff --git a/compat/os/sunos.h b/compat/os/sunos.h index ad0775401f..b124c81905 100644 --- a/compat/os/sunos.h +++ b/compat/os/sunos.h @@ -9,7 +9,6 @@ *--------------------------------------------------------------------------* ****************************************************************************/ - /* O_NONBLOCK requires to be included first */ #if HAVE_FCNTL_H #include @@ -20,7 +19,5 @@ */ #define SQUID_NONBLOCK O_NDELAY - - #endif /* _SQUID_SUNOS_ */ #endif /* SQUID_OS_SUNOS_H */ diff --git a/compat/osdetect.h b/compat/osdetect.h index 258e082ac3..4b98346432 100644 --- a/compat/osdetect.h +++ b/compat/osdetect.h @@ -1,7 +1,6 @@ #ifndef SQUID_COMPAT_OSDETECT_H #define SQUID_COMPAT_OSDETECT_H - /**************************************************************************** *--------------------------------------------------------------------------* * DO *NOT* MAKE ANY CHANGES below here unless you know what you're doing...* @@ -94,6 +93,4 @@ #endif /* OS automatic detection */ - - #endif /* SQUID_COMPAT_OSDETECT_H */ diff --git a/compat/shm.cc b/compat/shm.cc index 8ca7e2402b..a2f4e1b621 100644 --- a/compat/shm.cc +++ b/compat/shm.cc @@ -5,7 +5,6 @@ #include #endif - /* * Some systems have filesystem-based resources and interpret segment names * as file paths. The so-called 'portable' "/name" format does not work well diff --git a/compat/shm.h b/compat/shm.h index 873a44c40d..112e4b48c0 100644 --- a/compat/shm.h +++ b/compat/shm.h @@ -42,7 +42,6 @@ extern "C" { #endif /* HAVE_SHM */ - /// Determines whether segment names are iterpreted as full file paths. bool shm_portable_segment_name_is_path(); diff --git a/compat/strtoll.c b/compat/strtoll.c index 8b3ad48c20..ab8ecf1d74 100644 --- a/compat/strtoll.c +++ b/compat/strtoll.c @@ -43,7 +43,6 @@ #include #endif - #ifndef INT64_MIN /* Native 64 bit system without strtoll() */ #if defined(LONG_MIN) && (SIZEOF_LONG == 8) @@ -64,7 +63,6 @@ #endif #endif - /* * Convert a string to a int64 integer. * diff --git a/compat/tempnam.c b/compat/tempnam.c index 6e4e825b5f..c9f1e70f84 100644 --- a/compat/tempnam.c +++ b/compat/tempnam.c @@ -46,7 +46,6 @@ #endif #endif - static char * _tmpnam(void) { diff --git a/compat/types.h b/compat/types.h index 52b3a5a79e..59a32cbe63 100644 --- a/compat/types.h +++ b/compat/types.h @@ -81,12 +81,10 @@ #include #endif - /******************************************************/ /* Typedefs for missing entries on a system */ /******************************************************/ - /* * ISO C99 Standard printf() macros for 64 bit integers * On some 64 bit platform, HP Tru64 is one, for printf must be used diff --git a/compat/xstring.h b/compat/xstring.h index 0b825d215f..4b6c4319d0 100644 --- a/compat/xstring.h +++ b/compat/xstring.h @@ -49,7 +49,6 @@ extern "C" { #endif #define strndup(X) xstrndup((X)) - #ifdef __cplusplus } #endif diff --git a/helpers/basic_auth/MSNT/byteorder.h b/helpers/basic_auth/MSNT/byteorder.h index b901f20d8f..ae129da541 100644 --- a/helpers/basic_auth/MSNT/byteorder.h +++ b/helpers/basic_auth/MSNT/byteorder.h @@ -74,7 +74,6 @@ typedef unsigned int uint32; #define SIVALS(buf,pos,val) IVALS(buf,pos)=((int32)(val)) #endif - /* now the reverse routines - these are used in nmb packets (mostly) */ #define SREV(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF)) #define IREV(x) ((SREV(x)<<16) | (SREV((x)>>16))) diff --git a/helpers/basic_auth/MSNT/denyusers.cc b/helpers/basic_auth/MSNT/denyusers.cc index 6192fe99e1..ddc995b442 100644 --- a/helpers/basic_auth/MSNT/denyusers.cc +++ b/helpers/basic_auth/MSNT/denyusers.cc @@ -44,7 +44,6 @@ Check_fordenychange(void) Check_forfilechange(&DenyUsers); } - /* * Check to see if the username provided by Squid appears in the denied * user list. Returns 0 if the user was not found, and 1 if they were. diff --git a/helpers/basic_auth/MSNT/usersfile.h b/helpers/basic_auth/MSNT/usersfile.h index 7413a65745..e681b2add6 100644 --- a/helpers/basic_auth/MSNT/usersfile.h +++ b/helpers/basic_auth/MSNT/usersfile.h @@ -1,5 +1,4 @@ - typedef struct { char *path; char **names; @@ -8,8 +7,6 @@ typedef struct { time_t LMT; } usersfile; - - int Read_usersfile(const char *path, usersfile * uf); int Check_userlist(usersfile * uf, char *User); void Check_forfilechange(usersfile * uf); diff --git a/helpers/basic_auth/RADIUS/basic_radius_auth.cc b/helpers/basic_auth/RADIUS/basic_radius_auth.cc index a7cdde1adc..41b6f2052a 100644 --- a/helpers/basic_auth/RADIUS/basic_radius_auth.cc +++ b/helpers/basic_auth/RADIUS/basic_radius_auth.cc @@ -202,7 +202,6 @@ result_recv(uint32_t host, unsigned short udp_port, char *buffer, int length) return 0; } - /* * Generate a random vector. */ diff --git a/helpers/basic_auth/RADIUS/radius.h b/helpers/basic_auth/RADIUS/radius.h index fc16ed72ee..8f3716ec8f 100644 --- a/helpers/basic_auth/RADIUS/radius.h +++ b/helpers/basic_auth/RADIUS/radius.h @@ -33,7 +33,6 @@ #define AUTH_PASS_LEN 16 #define AUTH_STRING_LEN 128 /* maximum of 254 */ - typedef struct pw_auth_hdr { u_char code; u_char id; @@ -55,7 +54,6 @@ typedef struct pw_auth_hdr { #define PW_TYPE_IPADDR 2 #define PW_TYPE_DATE 3 - #define PW_AUTHENTICATION_REQUEST 1 #define PW_AUTHENTICATION_ACK 2 #define PW_AUTHENTICATION_REJECT 3 diff --git a/helpers/basic_auth/SMB/basic_smb_auth.cc b/helpers/basic_auth/SMB/basic_smb_auth.cc index 9bea63a988..568f0a6db6 100644 --- a/helpers/basic_auth/SMB/basic_smb_auth.cc +++ b/helpers/basic_auth/SMB/basic_smb_auth.cc @@ -52,7 +52,6 @@ #include #endif - #define NMB_UNICAST 1 #define NMB_BROADCAST 2 diff --git a/helpers/digest_auth/LDAP/digest_pw_auth.cc b/helpers/digest_auth/LDAP/digest_pw_auth.cc index 0a62f1d818..ebf6ea1c4e 100644 --- a/helpers/digest_auth/LDAP/digest_pw_auth.cc +++ b/helpers/digest_auth/LDAP/digest_pw_auth.cc @@ -36,7 +36,6 @@ #define PROGRAM_NAME "digest_ldap_auth" - static void GetHHA1(RequestData * requestData) { diff --git a/helpers/digest_auth/LDAP/ldap_backend.cc b/helpers/digest_auth/LDAP/ldap_backend.cc index 50e18f2931..f7d9244e00 100644 --- a/helpers/digest_auth/LDAP/ldap_backend.cc +++ b/helpers/digest_auth/LDAP/ldap_backend.cc @@ -295,8 +295,6 @@ retrydnattr: return NULL; } - - static void ldapconnect(void) { diff --git a/helpers/digest_auth/eDirectory/edir_ldapext.cc b/helpers/digest_auth/eDirectory/edir_ldapext.cc index a13b718757..812b4e82bb 100644 --- a/helpers/digest_auth/eDirectory/edir_ldapext.cc +++ b/helpers/digest_auth/eDirectory/edir_ldapext.cc @@ -85,7 +85,6 @@ static int berEncodePasswordData( const char * utf8Pwd2Ptr = NULL; int utf8Pwd2Size = 0; - /* Convert objectDN and tag strings from Unicode to UTF-8 */ utf8ObjSize = strlen(objectDN)+1; utf8ObjPtr = objectDN; @@ -393,7 +392,6 @@ static int nmasldap_get_simple_pwd( return err; } - /********************************************************************** Attempts to get the Universal Password **********************************************************************/ diff --git a/helpers/digest_auth/eDirectory/ldap_backend.cc b/helpers/digest_auth/eDirectory/ldap_backend.cc index 8f676e0454..814a5df023 100644 --- a/helpers/digest_auth/eDirectory/ldap_backend.cc +++ b/helpers/digest_auth/eDirectory/ldap_backend.cc @@ -323,8 +323,6 @@ retrydnattr: return NULL; } - - static void ldapconnect(void) { diff --git a/helpers/external_acl/AD_group/ext_ad_group_acl.cc b/helpers/external_acl/AD_group/ext_ad_group_acl.cc index 32d580a609..6b5b9219e6 100644 --- a/helpers/external_acl/AD_group/ext_ad_group_acl.cc +++ b/helpers/external_acl/AD_group/ext_ad_group_acl.cc @@ -112,7 +112,6 @@ int User_Groups_Count = 0; wchar_t *My_NameTranslate(wchar_t *, int, int); char *Get_WIN32_ErrorMessage(HRESULT); - void CloseCOM(void) { @@ -120,7 +119,6 @@ CloseCOM(void) CoUninitialize(); } - HRESULT GetLPBYTEtoOctetString(VARIANT * pVar, LPBYTE * ppByte) { @@ -151,7 +149,6 @@ GetLPBYTEtoOctetString(VARIANT * pVar, LPBYTE * ppByte) return hr; } - wchar_t * Get_primaryGroup(IADs * pUser) { @@ -210,7 +207,6 @@ Get_primaryGroup(IADs * pUser) return result; } - char * Get_WIN32_ErrorMessage(HRESULT hr) { @@ -225,7 +221,6 @@ Get_WIN32_ErrorMessage(HRESULT hr) return WIN32_ErrorMessage; } - wchar_t * My_NameTranslate(wchar_t * name, int in_format, int out_format) { @@ -281,7 +276,6 @@ My_NameTranslate(wchar_t * name, int in_format, int out_format) return wc; } - wchar_t * GetLDAPPath(wchar_t * Base_DN, int query_mode) { @@ -298,7 +292,6 @@ GetLDAPPath(wchar_t * Base_DN, int query_mode) return wc; } - char * GetDomainName(void) { @@ -349,7 +342,6 @@ GetDomainName(void) return DomainName; } - int add_User_Group(wchar_t * Group) { @@ -375,7 +367,6 @@ add_User_Group(wchar_t * Group) return 1; } - /* returns 0 on match, -1 if no match */ static int wccmparray(const wchar_t * str, const wchar_t ** array) @@ -389,7 +380,6 @@ wccmparray(const wchar_t * str, const wchar_t ** array) return -1; } - /* returns 0 on match, -1 if no match */ static int wcstrcmparray(const wchar_t * str, const char **array) @@ -407,7 +397,6 @@ wcstrcmparray(const wchar_t * str, const char **array) return -1; } - HRESULT Recursive_Memberof(IADs * pObj) { @@ -487,7 +476,6 @@ Recursive_Memberof(IADs * pObj) return hr; } - static wchar_t ** build_groups_DN_array(const char **array, char *userdomain) { @@ -530,7 +518,6 @@ build_groups_DN_array(const char **array, char *userdomain) return wc_array; } - /* returns 1 on success, 0 on failure */ int Valid_Local_Groups(char *UserName, const char **Groups) @@ -609,7 +596,6 @@ Valid_Local_Groups(char *UserName, const char **Groups) return result; } - /* returns 1 on success, 0 on failure */ int Valid_Global_Groups(char *UserName, const char **Groups) @@ -780,7 +766,6 @@ process_options(int argc, char *argv[]) return; } - int main(int argc, char *argv[]) { @@ -824,7 +809,6 @@ main(int argc, char *argv[]) atexit(CloseCOM); - /* Main Loop */ while (fgets(buf, HELPER_INPUT_BUFFER, stdin)) { if (NULL == strchr(buf, '\n')) { diff --git a/helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc b/helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc index 03a74466e2..48d8691696 100644 --- a/helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc +++ b/helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc @@ -813,7 +813,6 @@ searchLDAP(LDAP * ld, char *group, char *login, char *extension_dn) } } - int readSecret(const char *filename) { diff --git a/helpers/external_acl/LM_group/ext_lm_group_acl.cc b/helpers/external_acl/LM_group/ext_lm_group_acl.cc index 2e372c52ce..1cf53984b1 100644 --- a/helpers/external_acl/LM_group/ext_lm_group_acl.cc +++ b/helpers/external_acl/LM_group/ext_lm_group_acl.cc @@ -71,7 +71,6 @@ #include "helpers/defines.h" #include "include/util.h" - #if _SQUID_CYGWIN_ #include int _wcsicmp(const wchar_t *, const wchar_t *); @@ -95,7 +94,6 @@ int _wcsicmp(const wchar_t *, const wchar_t *); #include #include - int use_global = 0; int use_PDC_only = 0; char *program_name; @@ -105,7 +103,6 @@ int use_case_insensitive_compare = 0; char *DefaultDomain = NULL; const char NTV_VALID_DOMAIN_SEPARATOR[] = "\\/"; - char * AllocStrFromLSAStr(LSA_UNICODE_STRING LsaStr) { @@ -128,7 +125,6 @@ AllocStrFromLSAStr(LSA_UNICODE_STRING LsaStr) return target; } - char * GetDomainName(void) { @@ -309,7 +305,6 @@ Valid_Local_Groups(char *UserName, const char **Groups) return result; } - /* returns 1 on success, 0 on failure */ int Valid_Global_Groups(char *UserName, const char **Groups) @@ -364,7 +359,6 @@ Valid_Global_Groups(char *UserName, const char **Groups) MultiByteToWideChar(CP_ACP, 0, machinedomain, strlen(machinedomain) + 1, wszLocalDomain, sizeof(wszLocalDomain) / sizeof(wszLocalDomain[0])); - /* Call the NetServerGetInfo function for local computer, specifying level 101. */ dwLevel = 101; nStatus = NetServerGetInfo(NULL, dwLevel, (LPBYTE *) & pSrvBuf); @@ -510,7 +504,6 @@ process_options(int argc, char *argv[]) return; } - int main(int argc, char *argv[]) { diff --git a/helpers/external_acl/file_userip/ext_file_userip_acl.cc b/helpers/external_acl/file_userip/ext_file_userip_acl.cc index c06fc6bd05..34dbc69777 100644 --- a/helpers/external_acl/file_userip/ext_file_userip_acl.cc +++ b/helpers/external_acl/file_userip/ext_file_userip_acl.cc @@ -45,7 +45,6 @@ #include #endif - struct ip_user_dict { unsigned long address; // IP address (assumes IPv4) unsigned long netmask; // IP netmask diff --git a/helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc b/helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc index 68773fe654..5918258b85 100644 --- a/helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc +++ b/helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc @@ -427,7 +427,6 @@ main(int argc, char *const argv[]) } } - } void diff --git a/helpers/external_acl/kerberos_ldap_group/support.h b/helpers/external_acl/kerberos_ldap_group/support.h index a8342958de..5edd83e3da 100644 --- a/helpers/external_acl/kerberos_ldap_group/support.h +++ b/helpers/external_acl/kerberos_ldap_group/support.h @@ -108,7 +108,6 @@ SQUIDCEXTERN int log_enabled; /* the macro overload style is really a gcc-ism */ #ifdef __GNUC__ - #define log(X...) \ if (log_enabled) { \ fprintf(stderr, "%s(%d): pid=%ld :", __FILE__, __LINE__, (long)getpid() ); \ @@ -131,7 +130,6 @@ void error(char *format,...); void warn(char *format,...); #endif - struct hstruct { char *host; int port; @@ -144,7 +142,6 @@ struct ldap_creds { char *pw; }; - void init_args(struct main_args *margs); void clean_args(struct main_args *margs); const char *LogTime(void); diff --git a/helpers/external_acl/kerberos_ldap_group/support_group.cc b/helpers/external_acl/kerberos_ldap_group/support_group.cc index 5f528c2ec7..f6f0868960 100644 --- a/helpers/external_acl/kerberos_ldap_group/support_group.cc +++ b/helpers/external_acl/kerberos_ldap_group/support_group.cc @@ -152,7 +152,6 @@ hex_utf_char(struct main_args *margs, int flag) return NULL; } - if (n == a - 1) { debug((char *) "%s| %s: WARNING: Invalid Hex UTF-8 string %s\n", LogTime(), PROGRAM, up); if (ul) @@ -296,7 +295,6 @@ hex_utf_char(struct main_args *margs, int flag) return ul; } - int create_gd(struct main_args *margs) { diff --git a/helpers/external_acl/kerberos_ldap_group/support_ldap.cc b/helpers/external_acl/kerberos_ldap_group/support_ldap.cc index 070b0b9022..a6b058bf9b 100644 --- a/helpers/external_acl/kerberos_ldap_group/support_ldap.cc +++ b/helpers/external_acl/kerberos_ldap_group/support_ldap.cc @@ -826,7 +826,6 @@ get_memberof(struct main_args *margs, char *user, char *domain, char *group) char *p; char *ldap_filter_esc = NULL; - searchtime.tv_sec = SEARCH_TIMEOUT; searchtime.tv_usec = 0; /* diff --git a/helpers/external_acl/kerberos_ldap_group/support_member.cc b/helpers/external_acl/kerberos_ldap_group/support_member.cc index d9916821b0..cbd0ca9cc8 100644 --- a/helpers/external_acl/kerberos_ldap_group/support_member.cc +++ b/helpers/external_acl/kerberos_ldap_group/support_member.cc @@ -48,7 +48,6 @@ check_memberof(struct main_args *margs, char *user, char *domain) struct gdstruct *gr; int found = 0; - /* Check users domain */ gr = margs->groups; diff --git a/helpers/external_acl/kerberos_ldap_group/support_resolv.cc b/helpers/external_acl/kerberos_ldap_group/support_resolv.cc index 42415c0b1e..7f53353752 100644 --- a/helpers/external_acl/kerberos_ldap_group/support_resolv.cc +++ b/helpers/external_acl/kerberos_ldap_group/support_resolv.cc @@ -158,7 +158,6 @@ free_hostname_list(struct hstruct **hlist, int nhosts) hp[i].host = NULL; } - if (hp) xfree(hp); hp = NULL; diff --git a/helpers/external_acl/kerberos_ldap_group/support_sasl.cc b/helpers/external_acl/kerberos_ldap_group/support_sasl.cc index eadd152883..1fd26e2f58 100644 --- a/helpers/external_acl/kerberos_ldap_group/support_sasl.cc +++ b/helpers/external_acl/kerberos_ldap_group/support_sasl.cc @@ -72,12 +72,10 @@ int lutil_sasl_interact( void lutil_sasl_freedefs( void *defaults); - /* * SASL definitions for openldap support */ - typedef struct lutil_sasl_defaults_s { char *mech; char *realm; diff --git a/helpers/external_acl/time_quota/ext_time_quota_acl.cc b/helpers/external_acl/time_quota/ext_time_quota_acl.cc index e5869e2e97..16b7301f75 100644 --- a/helpers/external_acl/time_quota/ext_time_quota_acl.cc +++ b/helpers/external_acl/time_quota/ext_time_quota_acl.cc @@ -242,7 +242,6 @@ static void parseTime(const char *s, time_t *secs, time_t *start) *secs = (long)(periodLength * value); } - /** This function parses the time quota file and stores it * in memory. */ diff --git a/helpers/external_acl/unix_group/check_group.cc b/helpers/external_acl/unix_group/check_group.cc index 0af0a0113c..a7bba33f35 100644 --- a/helpers/external_acl/unix_group/check_group.cc +++ b/helpers/external_acl/unix_group/check_group.cc @@ -143,7 +143,6 @@ usage(char *program) "-s Strip NT domain from usernames\n"); } - int main(int argc, char *argv[]) { diff --git a/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc b/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc index c578a92928..cbfc018aa4 100644 --- a/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc +++ b/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc @@ -206,8 +206,6 @@ check_gss_err(OM_uint32 major_status, OM_uint32 minor_status, return (0); } - - int main(int argc, char *const argv[]) { @@ -422,7 +420,6 @@ main(int argc, char *const argv[]) GSS_C_NO_CHANNEL_BINDINGS, &client_name, NULL, &output_token, &ret_flags, NULL, NULL); - if (output_token.length) { spnegoToken = (const unsigned char *) output_token.value; spnegoTokenLength = output_token.length; diff --git a/helpers/negotiate_auth/wrapper/negotiate_wrapper.cc b/helpers/negotiate_auth/wrapper/negotiate_wrapper.cc index 2276f33c7b..fb767902ec 100644 --- a/helpers/negotiate_auth/wrapper/negotiate_wrapper.cc +++ b/helpers/negotiate_auth/wrapper/negotiate_wrapper.cc @@ -197,7 +197,6 @@ main(int argc, char *const argv[]) return 1; } - if (( fpid = vfork()) < 0 ) { fprintf(stderr, "%s| %s: Failed first fork\n", LogTime(), PROGRAM); return 1; @@ -278,7 +277,6 @@ main(int argc, char *const argv[]) setbuf(FDNIN, NULL); setbuf(FDNOUT, NULL); - while (1) { if (fgets(buf, sizeof(buf) - 1, stdin) == NULL) { if (ferror(stdin)) { diff --git a/helpers/ntlm_auth/SSPI/ntlm_sspi_auth.cc b/helpers/ntlm_auth/SSPI/ntlm_sspi_auth.cc index 53e01ea6c1..054b9b81f4 100644 --- a/helpers/ntlm_auth/SSPI/ntlm_sspi_auth.cc +++ b/helpers/ntlm_auth/SSPI/ntlm_sspi_auth.cc @@ -163,7 +163,6 @@ Valid_Group(char *UserName, char *Group) return result; } - char * AllocStrFromLSAStr(LSA_UNICODE_STRING LsaStr) { size_t len; @@ -185,7 +184,6 @@ char * AllocStrFromLSAStr(LSA_UNICODE_STRING LsaStr) return target; } - char * GetDomainName(void) { @@ -368,7 +366,6 @@ usage() my_program_name); } - void process_options(int argc, char *argv[]) { diff --git a/helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc b/helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc index e0caf0f9e2..f553016171 100644 --- a/helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc +++ b/helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc @@ -56,7 +56,6 @@ #include #endif - /************* CONFIGURATION ***************/ #define DEAD_DC_RETRY_INTERVAL 30 @@ -94,7 +93,6 @@ void process_options(int argc, char *argv[]); const char * obtain_challenge(void); void manage_request(void); - #define ENCODED_PASS_LEN 24 #define MAX_USERNAME_LEN 255 #define MAX_DOMAIN_LEN 255 @@ -117,7 +115,6 @@ int numcontrollers = 0; dc *current_dc; char smb_error_buffer[1000]; - /* Disconnects from the DC. A reconnection will be done upon the next request */ void @@ -159,7 +156,6 @@ init_challenge(char *domain, char *domain_controller) smberr = SMB_Get_Last_Error(); SMB_Get_Error_Msg(smberr, errstr, 1000); - if (handle == NULL) { /* couldn't connect */ debug("Couldn't connect to SMB Server. Error:%s\n", errstr); return 1; @@ -257,7 +253,6 @@ ntlm_check_auth(ntlm_authenticate * auth, int auth_length) memcpy(user, tmp.str, tmp.l); *(user + tmp.l) = '\0'; - /* Authenticating against the NT response doesn't seem to work... */ tmp = ntlm_fetch_string(&(auth->hdr), auth_length, &auth->lmresponse, auth->flags); if (tmp.str == NULL || tmp.l == 0) { @@ -298,7 +293,6 @@ ntlm_check_auth(ntlm_authenticate * auth, int auth_length) /* TODO: check against empty password!!!!! */ - debug("checking domain: '%s', user: '%s', pass='%s'\n", domain, user, pass); rv = SMB_Logon_Server(handle, user, pass, domain, 1); @@ -468,7 +462,6 @@ obtain_challenge() return NULL; } - void manage_request() { @@ -631,7 +624,6 @@ manage_request() return; /********* END ********/ - } int diff --git a/include/CbDataList.h b/include/CbDataList.h index 4c5c06e3ee..a7376416e2 100644 --- a/include/CbDataList.h +++ b/include/CbDataList.h @@ -154,7 +154,6 @@ CbDataList::tail() return last; } - template bool CbDataList::find (C const &toFind) const diff --git a/include/MemPool.h b/include/MemPool.h index 6da91221fb..ac1ce16de4 100644 --- a/include/MemPool.h +++ b/include/MemPool.h @@ -99,7 +99,6 @@ public: MemMeter inuse; MemMeter idle; - /** history Allocations */ mgb_t gb_allocated; mgb_t gb_oallocated; @@ -439,5 +438,4 @@ MemAllocatorProxy::MemAllocatorProxy(char const *aLabel, size_t const &aSize) : { } - #endif /* _MEM_POOL_H_ */ diff --git a/include/MemPoolMalloc.h b/include/MemPoolMalloc.h index 51a15c75c1..2999dd4620 100644 --- a/include/MemPoolMalloc.h +++ b/include/MemPoolMalloc.h @@ -45,5 +45,4 @@ private: Stack freelist; }; - #endif /* _MEM_POOL_MALLOC_H_ */ diff --git a/include/SquidNew.h b/include/SquidNew.h index 84054b716b..2004f93a4d 100644 --- a/include/SquidNew.h +++ b/include/SquidNew.h @@ -59,7 +59,6 @@ _SQUID_EXTERNNEW_ void operator delete[] (void *address) throw() xfree(address); } - #endif /* __SUNPRO_CC */ #endif /* SQUID_NEW_H */ diff --git a/include/base64.h b/include/base64.h index 593941249e..f9cac49f07 100644 --- a/include/base64.h +++ b/include/base64.h @@ -19,7 +19,6 @@ extern "C" { /// \return number of bytes filled in result. extern int base64_decode(char *result, unsigned int result_max_size, const char *encoded); - // Encoding functions /// Calculate the buffer size required to hold the encoded form of @@ -46,7 +45,6 @@ extern "C" { // Ensures a nul-terminated result. Will always return non-NULL. extern const char *old_base64_encode(const char *decoded); - #ifdef __cplusplus } #endif diff --git a/include/cache_snmp.h b/include/cache_snmp.h index c0bcb9846e..86acc263db 100644 --- a/include/cache_snmp.h +++ b/include/cache_snmp.h @@ -85,7 +85,6 @@ enum { #define LEN_CONF LEN_SQ_CONF + 1 #define LEN_CONF_INST LEN_SQ_CONF + 2 - /** * cacheStorageConfig group { cacheConfig 5 } */ @@ -112,7 +111,6 @@ enum { PERF_END }; - /* cacheSysPerf */ enum { PERF_SYS_START = 0, diff --git a/include/heap.h b/include/heap.h index ae0c8b10e1..62dbaabe82 100644 --- a/include/heap.h +++ b/include/heap.h @@ -54,7 +54,6 @@ typedef void * heap_t; typedef double heap_key; typedef heap_key heap_key_func(heap_t, heap_key); - /* * Heap node. Has a key value generated by a key_func, id (array index) so * it can be quickly found in its heap, and a pointer to a data object that @@ -66,7 +65,6 @@ typedef struct _heap_node { heap_t data; } heap_node; - /* * Heap object. Holds an array of heap_node objects along with a heap size * (array length), the index of the last heap element, and a key generation @@ -128,7 +126,6 @@ SQUIDCEXTERN heap_key heap_gen_key(heap * hp, heap_t dat); #define heap_gen_key(hp,md) ((hp)->gen_key((md),(hp)->age)) #endif /* MACRO_DEBUG */ - /* * Extract the minimum (root) element and maintain the heap property. * Returns the data pointed to by the root node, which the caller must diff --git a/include/radix.h b/include/radix.h index d94ab98ffc..1d33fb3a04 100644 --- a/include/radix.h +++ b/include/radix.h @@ -138,7 +138,6 @@ struct squid_radix_node_head { struct squid_radix_node rnh_nodes[3]; /* empty tree for common case */ }; - SQUIDCEXTERN void squid_rn_init (void); SQUIDCEXTERN int squid_rn_inithead(struct squid_radix_node_head **, int); diff --git a/include/rfc1035.h b/include/rfc1035.h index a8b71a12f0..c6df50319e 100644 --- a/include/rfc1035.h +++ b/include/rfc1035.h @@ -118,7 +118,6 @@ SQUIDCEXTERN const char * rfc1035ErrorMessage(int n); #define RFC1035_TYPE_PTR 12 #define RFC1035_CLASS_IN 1 - /* Child Library RFC3596 Depends on some otherwise internal functions */ SQUIDCEXTERN int rfc1035HeaderPack(char *buf, size_t sz, diff --git a/include/rfc1738.h b/include/rfc1738.h index de7ade4a3c..187d5c36e6 100644 --- a/include/rfc1738.h +++ b/include/rfc1738.h @@ -50,7 +50,6 @@ extern "C" { * Suitable for safely encoding an absolute URL which may be encoded but is not trusted. */ #define rfc1738_escape_unescaped(x) rfc1738_do_escape(x, RFC1738_ESCAPE_UNSAFE|RFC1738_ESCAPE_CTRLS|RFC1738_ESCAPE_NOPERCENT) - /** * Unescape a URL string according to RFC 1738 specification. * String is unescaped in-place diff --git a/include/rfc2617.h b/include/rfc2617.h index 49e71e9144..07e34a5828 100644 --- a/include/rfc2617.h +++ b/include/rfc2617.h @@ -12,7 +12,6 @@ * to prevent squid knowing the users password (idea suggested in RFC 2617). */ - /* * $Id$ * diff --git a/include/rfc2671.h b/include/rfc2671.h index 0f9f6e538b..475dcb6ff5 100644 --- a/include/rfc2671.h +++ b/include/rfc2671.h @@ -43,5 +43,4 @@ SQUIDCEXTERN int rfc2671RROptPack(char *buf, size_t sz, ssize_t edns_sz); - #endif /* SQUID_RFC3596_H */ diff --git a/include/snmp_api.h b/include/snmp_api.h index 573ea8d7e1..3c8517ef3f 100644 --- a/include/snmp_api.h +++ b/include/snmp_api.h @@ -27,8 +27,6 @@ SOFTWARE. * snmp_api.h - API for access to snmp. */ - - /* * Set fields in session and pdu to the following to get a default or unconfigured value. */ @@ -80,7 +78,6 @@ extern "C" { */ int snmp_close(struct snmp_session *); - /* * int snmp_send(session, pdu) * struct snmp_session *session; @@ -108,7 +105,6 @@ extern "C" { */ void snmp_read(fd_set *); - /* * int snmp_select_info(numfds, fdset, timeout, block) * int *numfds; @@ -150,7 +146,6 @@ extern "C" { */ void snmp_timeout(void); - /* * This routine must be supplied by the application: * @@ -166,10 +161,6 @@ extern "C" { * Operations are defined below: */ - - - - void snmp_api_stats(void *); #endif #ifdef __cplusplus diff --git a/include/snmp_util.h b/include/snmp_util.h index f03f4535a2..67606153c5 100644 --- a/include/snmp_util.h +++ b/include/snmp_util.h @@ -11,13 +11,11 @@ extern "C" { /* call a function at regular intervals (in seconds): */ extern void snmp_alarm(int ival, void (*handler) (void)); - /* service for filedescriptors: */ extern void fd_add(int fd, void (*func) (int fd)); extern void fd_service(void); - /* ---------------------------------------------------------------------- */ /* @@ -26,7 +24,6 @@ extern "C" { * Copyright (c) 1997 FT/CNET/DES/GRL Olivier Montanuy */ - /* Function to safely copy a string, and ensure the last * character is always '\0'. */ void strcpy_safe(char *str, int str_len, char *val); diff --git a/include/snmp_vars.h b/include/snmp_vars.h index 020919f09b..abb04c0dda 100644 --- a/include/snmp_vars.h +++ b/include/snmp_vars.h @@ -74,7 +74,6 @@ extern "C" { #define SMI_OPAQUE (ASN_APPLICATION | 4) /* OCTET STRING */ #define SMI_COUNTER64 (ASN_APPLICATION | 6) /* INTEGER */ - /* constants for enums for the MIB nodes * cachePeerAddressType (InetAddressType / ASN_INTEGER) * cacheClientAddressType (InetAddressType / ASN_INTEGER) @@ -93,7 +92,6 @@ extern "C" { #endif /* INETADDRESSTYPE_ENUMS */ - /* * RFC 1905: Protocol Operations for SNMPv2 * diff --git a/include/splay.h b/include/splay.h index b31b2caae0..253cede404 100644 --- a/include/splay.h +++ b/include/splay.h @@ -79,7 +79,6 @@ public: size_t elements; }; - SQUIDCEXTERN int splayLastResult; SQUIDCEXTERN splayNode *splay_insert(void *, splayNode *, splayNode::SPLAYCMP *); diff --git a/lib/Array.cc b/lib/Array.cc index afa73794f6..7e91641764 100644 --- a/lib/Array.cc +++ b/lib/Array.cc @@ -39,7 +39,6 @@ * we do not need such an interface yet. */ - #include "squid.h" #include "Array.h" diff --git a/lib/MemPoolMalloc.cc b/lib/MemPoolMalloc.cc index d6067cd9ac..a51e451687 100644 --- a/lib/MemPoolMalloc.cc +++ b/lib/MemPoolMalloc.cc @@ -33,7 +33,6 @@ * */ - #include "squid.h" #if HAVE_ASSERT_H #include diff --git a/lib/base64.c b/lib/base64.c index b21e519d56..370bb19035 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -16,7 +16,6 @@ #include #endif - static void base64_init(void); static int base64_initialized = 0; @@ -25,7 +24,6 @@ static int base64_initialized = 0; int base64_value[BASE64_VALUE_SZ]; const char base64_code[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - static void base64_init(void) { diff --git a/lib/dirent.c b/lib/dirent.c index cc3c2c322d..0f0a39bfb6 100644 --- a/lib/dirent.c +++ b/lib/dirent.c @@ -66,7 +66,6 @@ #define SUFFIX ("*") #define SLASH ("\\") - /* * opendir * @@ -149,7 +148,6 @@ opendir(const CHAR * szPath) return nd; } - /* * readdir * @@ -211,7 +209,6 @@ readdir(DIR * dirp) { return (struct dirent *) 0; } - /* * closedir * diff --git a/lib/encrypt.c b/lib/encrypt.c index 75a6a117ce..8809f69584 100644 --- a/lib/encrypt.c +++ b/lib/encrypt.c @@ -30,7 +30,6 @@ static char schluessel[16][KS]; - static char PC1[] = { 56, 48, 40, 32, 24, 16, 8, 0, 57, 49, 41, 33, 25, 17, 9, 1, @@ -42,7 +41,6 @@ static char PC1[] = { 27, 19, 11, 3 }; - static char PC2[] = { 13, 16, 10, 23, 0, 4, 2, 27, 14, 5, 20, 9, 22, 18, 11, 3, @@ -52,7 +50,6 @@ static char PC2[] = { 33, 52, 45, 41, 49, 35, 28, 31 }; - static char IP[] = { 57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3, @@ -64,7 +61,6 @@ static char IP[] = { 62, 54, 46, 38, 30, 22, 14, 6 }; - static char EP[] = { 7, 39, 15, 47, 23, 55, 31, 63, 6, 38, 14, 46, 22, 54, 30, 62, @@ -76,7 +72,6 @@ static char EP[] = { 0, 32, 8, 40, 16, 48, 24, 56 }; - static char E0[] = { 31, 0, 1, 2, 3, 4, 3, 4, 5, 6, 7, 8, 7, 8, 9, 10, @@ -86,10 +81,8 @@ static char E0[] = { 27, 28, 27, 28, 29, 30, 31, 0 }; - static char E[KS]; - static char PERM[] = { 15, 6, 19, 20, 28, 11, 27, 16, 0, 14, 22, 25, 4, 17, 30, 9, @@ -97,7 +90,6 @@ static char PERM[] = { 18, 12, 29, 5, 21, 10, 3, 24 }; - static char S_BOX[][64] = { { 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1, diff --git a/lib/getfullhostname.c b/lib/getfullhostname.c index 3c12e3484f..e11da0b07d 100644 --- a/lib/getfullhostname.c +++ b/lib/getfullhostname.c @@ -34,7 +34,6 @@ #include "squid.h" #include "getfullhostname.h" - #if HAVE_UNISTD_H /* for gethostname() function */ #include diff --git a/lib/hash.cc b/lib/hash.cc index 59366c4629..fc8c0ef1d2 100644 --- a/lib/hash.cc +++ b/lib/hash.cc @@ -355,7 +355,6 @@ hashKeyStr(hash_link * hl) return (const char *) hl->key; } - #if USE_HASH_DRIVER /** * hash-driver - Run with a big file as stdin to insert each line into the @@ -408,7 +407,6 @@ main(void) } printf("done walking hash table...\n"); - printf("driver finished.\n"); exit(0); } diff --git a/lib/heap.c b/lib/heap.c index 35f3fbc26b..25973dae22 100644 --- a/lib/heap.c +++ b/lib/heap.c @@ -112,7 +112,6 @@ new_heap(int initSize, heap_key_func gen_key) return hp; } - /* * Free memory used by a heap. Does not free the metadata pointed to by the * heap nodes, only the heap's internal memory. @@ -159,7 +158,6 @@ heap_insert(heap * hp, void *dat) return elm; } - /* * Delete ELM while maintaining the heap property. ELM may be modified. * Assumes that ELM is not NULL and frees it. Returns the data pointed to @@ -207,7 +205,6 @@ heap_gen_key(heap * hp, heap_t dat) } #endif /* heap_gen_key */ - /* * Returns the data of the node with the largest KEY value and removes that * node from the heap. Returns NULL if the heap was empty. @@ -230,7 +227,6 @@ heap_extractmin(heap * hp) return data; } - /* * Remove the last node in HP. Frees the heap internal structure and * returns the data pointes to by the last node. @@ -246,7 +242,6 @@ heap_extractlast(heap * hp) return data; } - /* * The semantics of this routine is the same as the followings: * heap_delete(hp, elm); @@ -270,7 +265,6 @@ heap_update(heap * hp, heap_node * elm, void *dat) return old; } - /* * A pointer to the root node's DATA. */ @@ -281,7 +275,6 @@ heap_peepmin(heap * hp) return hp->nodes[0]->data; } - /* * The KEY of the root node. */ @@ -292,7 +285,6 @@ heap_peepminkey(heap * hp) return hp->nodes[0]->key; } - /* * Same as heap_peep except that this return the KEY of the node. * Only meant for iteration. @@ -304,7 +296,6 @@ heap_peepkey(heap * hp, int n) return hp->nodes[n]->key; } - /* * A pointer to Nth node's DATA. The caller can iterate through HP by * calling this routine. eg. Caller can execute the following code: @@ -320,7 +311,6 @@ heap_peep(heap * hp, int n) return data; } - #ifndef heap_nodes /* * Current number of nodes in HP. @@ -332,7 +322,6 @@ heap_nodes(heap * hp) } #endif /* heap_nodes */ - #ifndef heap_empty /* * Determine if the heap is empty. Returns 1 if HP has no elements and 0 @@ -381,7 +370,6 @@ _heap_ify_down(heap * hp, heap_node * elm) } } - /* * Maintain the heap property above ELM. Caller has locked the heap. */ @@ -397,7 +385,6 @@ _heap_ify_up(heap * hp, heap_node * elm) } } - /* * Swap the position of ELM1 and ELM2 in heap structure. Their IDs are also * swapped. @@ -412,8 +399,6 @@ _heap_swap_element(heap * hp, heap_node * elm1, heap_node * elm2) hp->nodes[elm2->id] = elm2; } - - #ifdef NOTDEF /* * Copy KEY and DATA fields of SRC to DEST. ID field is NOT copied. @@ -427,7 +412,6 @@ _heap_copy_element(heap_node * src, heap_node * dest) #endif /* NOTDEF */ - /* * True if HP needs to be grown in size. */ @@ -439,7 +423,6 @@ _heap_should_grow(heap * hp) return 0; } - /* * Grow HP. */ @@ -463,7 +446,6 @@ _heap_grow(heap * hp) hp->size = newSize; } - /* * True if a node with ID exists in HP. */ diff --git a/lib/iso3307.c b/lib/iso3307.c index 3b90f87d4d..2df9515959 100644 --- a/lib/iso3307.c +++ b/lib/iso3307.c @@ -14,7 +14,6 @@ #include #endif - #define ASCII_DIGIT(c) ((c)-48) time_t diff --git a/lib/ntlmauth/ntlmauth.cc b/lib/ntlmauth/ntlmauth.cc index 5d991886c5..d07e0d7f10 100644 --- a/lib/ntlmauth/ntlmauth.cc +++ b/lib/ntlmauth/ntlmauth.cc @@ -186,14 +186,12 @@ ntlm_add_to_payload(const ntlmhdr *packet_hdr, (*payload_length) += toadd_length; } - /* ************************************************************************* */ /* Negotiate Packet functions */ /* ************************************************************************* */ // ? - /* ************************************************************************* */ /* Challenge Packet functions */ /* ************************************************************************* */ diff --git a/lib/ntlmauth/ntlmauth.h b/lib/ntlmauth/ntlmauth.h index 5dd2753ce8..5b65e7d05f 100644 --- a/lib/ntlmauth/ntlmauth.h +++ b/lib/ntlmauth/ntlmauth.h @@ -108,7 +108,6 @@ extern "C" { /** Debug dump the given flags field to stderr */ void ntlm_dump_ntlmssp_flags(const uint32_t flags); - /* ************************************************************************* */ /* Packet and Payload structures and handling functions */ /* ************************************************************************* */ @@ -144,7 +143,6 @@ extern "C" { const char *toadd, const int toadd_length); - /* ************************************************************************* */ /* Negotiate Packet structures and functions */ /* ************************************************************************* */ @@ -173,7 +171,6 @@ extern "C" { char payload[256]; /**< String data */ } ntlm_negotiate; - /* ************************************************************************* */ /* Challenge Packet structures and functions */ /* ************************************************************************* */ @@ -210,7 +207,6 @@ extern "C" { const int challenge_nonce_len, const uint32_t flags); - /* ************************************************************************* */ /* Authenticate Packet structures and functions */ /* ************************************************************************* */ @@ -234,7 +230,6 @@ extern "C" { char *domain, const int32_t size); - #if __cplusplus } #endif diff --git a/lib/profiler/Profiler.cc b/lib/profiler/Profiler.cc index 7a6ec7ca1b..5c1107d758 100644 --- a/lib/profiler/Profiler.cc +++ b/lib/profiler/Profiler.cc @@ -118,7 +118,6 @@ #if USE_XPROF_STATS - #if HAVE_ASSERT_H #include #endif @@ -136,7 +135,6 @@ TimersArray *xprof_Timers = NULL; /* Private stuff */ - /* new stuff */ #define MAXSTACKDEPTH 512 diff --git a/lib/radix.c b/lib/radix.c index 512b31a495..395f65aad5 100644 --- a/lib/radix.c +++ b/lib/radix.c @@ -32,7 +32,6 @@ * */ - /* * Copyright (c) 1988, 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -123,7 +122,6 @@ static char *rn_zeros, *rn_ones; #define rm_mask rm_rmu.rmu_mask #define rm_leaf rm_rmu.rmu_leaf /* extra field would make 32 bytes */ - /* Helper macros */ #define squid_Bcmp(a, b, l) (l == 0 ? 0 : memcmp((caddr_t)(a), (caddr_t)(b), (u_long)l)) #define squid_R_Malloc(p, t, n) (p = (t) xmalloc((unsigned int)(n))) diff --git a/lib/rfc1035.c b/lib/rfc1035.c index 6afc3dff62..45ce96afa4 100644 --- a/lib/rfc1035.c +++ b/lib/rfc1035.c @@ -78,8 +78,6 @@ #define RFC1035_UNPACK_DEBUG (void)0 #endif - - /* * rfc1035HeaderPack() * diff --git a/lib/rfc1123.c b/lib/rfc1123.c index e877bef046..23160fac49 100644 --- a/lib/rfc1123.c +++ b/lib/rfc1123.c @@ -63,7 +63,6 @@ static const char *month_names[12] = { "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; - static int make_num(const char *s) { diff --git a/lib/rfc2617.c b/lib/rfc2617.c index 9cda349976..200f030abf 100644 --- a/lib/rfc2617.c +++ b/lib/rfc2617.c @@ -11,7 +11,6 @@ * to prevent squid knowing the users password (idea suggested in RFC 2617). */ - /* * $Id$ * @@ -104,7 +103,6 @@ CvtBin(const HASHHEX Hex, HASH Bin) } } - /* calculate H(A1) as per spec */ void DigestCalcHA1( diff --git a/lib/rfc3596.c b/lib/rfc3596.c index fad37024a5..dc60348ec6 100644 --- a/lib/rfc3596.c +++ b/lib/rfc3596.c @@ -152,7 +152,6 @@ rfc3596BuildAAAAQuery(const char *hostname, char *buf, size_t sz, unsigned short return rfc3596BuildHostQuery(hostname, buf, sz, qid, query, RFC1035_TYPE_AAAA, edns_sz); } - /** * Builds a message buffer with a QUESTION to lookup PTR records * for an address. Caller must allocate 'buf' which should @@ -196,7 +195,6 @@ rfc3596BuildPTRQuery6(const struct in6_addr addr, char *buf, size_t sz, unsigned return rfc3596BuildHostQuery(rev, buf, sz, qid, query, RFC1035_TYPE_PTR, edns_sz); } - #if DRIVER /* driver needs the rfc1035 code _without_ the main() */ @@ -253,7 +251,6 @@ main(int argc, char *argv[]) return 1; } - memset(&S, '\0', sizeof(S)); if (prefer == 6) { diff --git a/lib/rfcnb/byteorder.h b/lib/rfcnb/byteorder.h index de91c4574f..d8ddd8ea6d 100644 --- a/lib/rfcnb/byteorder.h +++ b/lib/rfcnb/byteorder.h @@ -40,7 +40,6 @@ #define PVAL(buf,pos) ((unsigned)CVAL(buf,pos)) #define SCVAL(buf,pos,val) (CVAL(buf,pos) = (val)) - #if CAREFUL_ALIGNMENT #define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8) #define IVAL(buf,pos) (SVAL(buf,pos)|SVAL(buf,(pos)+2)<<16) @@ -69,7 +68,6 @@ #define SIVALS(buf,pos,val) IVALS(buf,pos)=((int32)(val)) #endif - /* now the reverse routines - these are used in nmb packets (mostly) */ #define SREV(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF)) #define IREV(x) ((SREV(x)<<16) | (SREV((x)>>16))) diff --git a/lib/rfcnb/rfcnb-io.c b/lib/rfcnb/rfcnb-io.c index 219f56239b..66beb302f4 100644 --- a/lib/rfcnb/rfcnb-io.c +++ b/lib/rfcnb/rfcnb-io.c @@ -169,7 +169,6 @@ RFCNB_Discard_Rest(struct RFCNB_Con *con, int len) } - /* Send an RFCNB packet to the connection. * * We just send each of the blocks linked together ... @@ -191,7 +190,6 @@ RFCNB_Put_Pkt(struct RFCNB_Con *con, struct RFCNB_Pkt *pkt, int len) /* Try to send the data ... We only send as many bytes as len claims */ /* We should try to stuff it into an IOVEC and send as one write */ - pkt_ptr = pkt; len_sent = tot_sent = 0; /* Nothing sent so far */ i = 0; @@ -267,7 +265,6 @@ RFCNB_Put_Pkt(struct RFCNB_Con *con, struct RFCNB_Pkt *pkt, int len) * */ - int RFCNB_Get_Pkt(struct RFCNB_Con *con, struct RFCNB_Pkt *pkt, int len) { diff --git a/lib/rfcnb/rfcnb-priv.h b/lib/rfcnb/rfcnb-priv.h index 65fb9d08d5..31e9ce7b92 100644 --- a/lib/rfcnb/rfcnb-priv.h +++ b/lib/rfcnb/rfcnb-priv.h @@ -127,7 +127,6 @@ typedef struct RFCNB_Sess_Pkt { char calling_name[33]; } RFCNB_Sess_Pkt; - typedef struct RFCNB_Nack_Pkt { struct RFCNB_Hdr hdr; unsigned char error; diff --git a/lib/smblib/file.c b/lib/smblib/file.c index f0cedca6a5..47abdca383 100644 --- a/lib/smblib/file.c +++ b/lib/smblib/file.c @@ -468,7 +468,6 @@ off_t SMB_Lseek(SMB_File *File_Handle, off_t offset, int whence) } - /* Write numbytes from data to the file pointed to by the File_Handle at */ /* the offset in the File_Handle. */ @@ -1195,7 +1194,6 @@ int SMB_Search(SMB_Tree_Handle tree, } - /* Now plug in the bits we need */ memset(SMB_Hdr(pkt), 0, SMB_search_len); @@ -1224,8 +1222,6 @@ int SMB_Search(SMB_Tree_Handle tree, strcpy(p+1, dir_name); p = p + strlen(dir_name) + 2; /* Skip the null */ - - *p = SMBvariableblockID; p = p + 1; diff --git a/lib/smblib/smb-errors.c b/lib/smblib/smb-errors.c index ea857864d6..6813ccdf07 100644 --- a/lib/smblib/smb-errors.c +++ b/lib/smblib/smb-errors.c @@ -31,7 +31,6 @@ /* ensure we don't overwrite strings when not passed enough space. Also */ /* added code to say unknown error codes if we see any */ - #include typedef struct { diff --git a/lib/smblib/smbdes.c b/lib/smblib/smbdes.c index 47f1be256b..2785af0c3a 100644 --- a/lib/smblib/smbdes.c +++ b/lib/smblib/smbdes.c @@ -24,7 +24,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - /* NOTES: * * This code makes no attempt to be fast! In fact, it is a very @@ -99,7 +98,6 @@ static int perm5[32] = {16, 7, 20, 21, 22, 11, 4, 25 }; - static int perm6[64] = {40, 8, 48, 16, 56, 24, 64, 32, 39, 7, 47, 15, 55, 23, 63, 31, 38, 6, 46, 14, 54, 22, 62, 30, @@ -110,7 +108,6 @@ static int perm6[64] = {40, 8, 48, 16, 56, 24, 64, 32, 33, 1, 41, 9, 49, 17, 57, 25 }; - static int sc[16] = {1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1}; static int sbox[8][4][16] = { @@ -297,7 +294,6 @@ str_to_key(unsigned char *str, unsigned char *key) } } - static void smbhash(unsigned char *out, unsigned char *in, unsigned char *key) { diff --git a/lib/smblib/smblib-api.c b/lib/smblib/smblib-api.c index 9604daee2f..2496d867b4 100644 --- a/lib/smblib/smblib-api.c +++ b/lib/smblib/smblib-api.c @@ -66,7 +66,6 @@ int SMBapi_NetUserPasswordSet(SMB_Tree_Handle tree, char *user, pad_api_name = TRUE; } - pkt_len = pkt_len + param_len; /* Now allocate space for the packet, build it and send it */ @@ -198,7 +197,6 @@ int SMBapi_NetUserPasswordSet(SMB_Tree_Handle tree, char *user, #define SMB_LMAPI_SUI_DESC "zWsTPWW" #define SMB_LMAPI_SUI_DATA_DESC "B16" - /* Set user info ... specifically, password */ int SMBapi_NetSetUserInfo(SMB_Tree_Handle tree, char *user, @@ -382,5 +380,4 @@ int SMBapi_NetShareEnum(SMB_Tree_Handle tree, char *enum_buf, int bufsiz, { - } diff --git a/lib/smblib/smblib-priv.h b/lib/smblib/smblib-priv.h index 5d3beffd12..5640da5efb 100644 --- a/lib/smblib/smblib-priv.h +++ b/lib/smblib/smblib-priv.h @@ -497,7 +497,6 @@ typedef enum {SMB_State_NoState, SMB_State_Stopped, SMB_State_Started} SMB_State /* The following two arrays need to be in step! */ /* We must make it possible for callers to specify these ... */ - extern int SMB_Types[]; typedef struct SMB_Status { diff --git a/lib/smblib/smblib-util.c b/lib/smblib/smblib-util.c index 1040fd433b..04ac0c591d 100644 --- a/lib/smblib/smblib-util.c +++ b/lib/smblib/smblib-util.c @@ -74,7 +74,6 @@ void SMB_Print_Pkt(FILE fd, RFCNB_Pkt *pkt, BOOL command, int Offset, int Len) /* Print the other bits in the header */ - /* etc */ } @@ -223,7 +222,6 @@ int SMB_Figure_Protocol(const char *dialects[], int prot_index) } - /* Negotiate the protocol we will use from the list passed in Prots */ /* we return the index of the accepted protocol in NegProt, -1 indicates */ /* none acceptible, and our return value is 0 if ok, <0 if problems */ @@ -303,7 +301,6 @@ int SMB_Negotiate(SMB_Handle_Type Con_Handle, const char *Prots[]) if (RFCNB_Send(Con_Handle -> Trans_Connect, pkt, pkt_len) < 0) { - #ifdef DEBUG fprintf(stderr, "Error sending negotiate protocol\n"); #endif diff --git a/lib/smblib/smblib.c b/lib/smblib/smblib.c index d32406a5e9..6c12433223 100644 --- a/lib/smblib/smblib.c +++ b/lib/smblib/smblib.c @@ -55,7 +55,6 @@ const char *SMB_Prots[] = {"PC NETWORK PROGRAM 1.0", NULL }; - /* Initialize the SMBlib package */ int SMB_Init() @@ -108,7 +107,6 @@ SMB_Handle_Type SMB_Connect_Server(SMB_Handle_Type Con_Handle, if ((con = (struct SMB_Connect_Def *)malloc(sizeof(struct SMB_Connect_Def))) == NULL) { - SMBlib_errno = SMBlibE_NoSpace; return NULL; } @@ -187,7 +185,6 @@ const char *SMB_Prots_Restrict[] = {"PC NETWORK PROGRAM 1.0", NULL }; - SMB_Handle_Type SMB_Connect(SMB_Handle_Type Con_Handle, SMB_Tree_Handle *tree, char *service, @@ -547,7 +544,6 @@ int SMB_Logon_Server(SMB_Handle_Type Con_Handle, char *UserName, } - /* Disconnect from the server, and disconnect all tree connects */ int SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle) diff --git a/lib/sspwin32.c b/lib/sspwin32.c index 434d97296a..d0ee1bb980 100644 --- a/lib/sspwin32.c +++ b/lib/sspwin32.c @@ -108,7 +108,6 @@ void UnloadSecurityDll(void) hModule = NULL; } - HMODULE LoadSecurityDll(int mode, char * SSP_Package) { TCHAR lpszDLL[MAX_PATH]; @@ -235,7 +234,6 @@ HMODULE LoadSecurityDll(int mode, char * SSP_Package) return hModule; } - BOOL GenClientContext(PAUTH_SEQ pAS, PSEC_WINNT_AUTH_IDENTITY pAuthIdentity, PVOID pIn, DWORD cbIn, PVOID pOut, PDWORD pcbOut, PBOOL pfDone) { @@ -304,7 +302,6 @@ BOOL GenClientContext(PAUTH_SEQ pAS, PSEC_WINNT_AUTH_IDENTITY pAuthIdentity, return TRUE; } - BOOL GenServerContext(PAUTH_SEQ pAS, PVOID pIn, DWORD cbIn, PVOID pOut, PDWORD pcbOut, PBOOL pfDone, char * credentials) { @@ -410,7 +407,6 @@ BOOL GenServerContext(PAUTH_SEQ pAS, PVOID pIn, DWORD cbIn, PVOID pOut, return TRUE; } - BOOL WINAPI SSP_LogonUser(PTSTR szUser, PTSTR szPassword, PTSTR szDomain) { AUTH_SEQ asServer = {0}; @@ -486,7 +482,6 @@ BOOL WINAPI SSP_LogonUser(PTSTR szUser, PTSTR szPassword, PTSTR szDomain) return fResult; } - const char * WINAPI SSP_MakeChallenge(PVOID PNegotiateBuf, int NegotiateLen) { BOOL fDone = FALSE; @@ -527,7 +522,6 @@ const char * WINAPI SSP_MakeChallenge(PVOID PNegotiateBuf, int NegotiateLen) return encoded; } - BOOL WINAPI SSP_ValidateNTLMCredentials(PVOID PAutenticateBuf, int AutenticateLen, char * credentials) { BOOL fDone = FALSE; @@ -553,7 +547,6 @@ BOOL WINAPI SSP_ValidateNTLMCredentials(PVOID PAutenticateBuf, int AutenticateLe return fResult; } - const char * WINAPI SSP_MakeNegotiateBlob(PVOID PNegotiateBuf, int NegotiateLen, PBOOL fDone, int * Status, char * credentials) { DWORD cbOut = 0; @@ -587,7 +580,6 @@ const char * WINAPI SSP_MakeNegotiateBlob(PVOID PNegotiateBuf, int NegotiateLen, return encoded; } - const char * WINAPI SSP_ValidateNegotiateCredentials(PVOID PAutenticateBuf, int AutenticateLen, PBOOL fDone, int * Status, char * credentials) { DWORD cbOut = 0; diff --git a/lib/tests/testArray.h b/lib/tests/testArray.h index 1c9955693e..4b0ddbdb27 100644 --- a/lib/tests/testArray.h +++ b/lib/tests/testArray.h @@ -22,6 +22,5 @@ protected: void all(); }; - #endif diff --git a/lib/tests/testMain.cc b/lib/tests/testMain.cc index 14febc501d..08626df9a2 100644 --- a/lib/tests/testMain.cc +++ b/lib/tests/testMain.cc @@ -7,7 +7,6 @@ #include #include - int main( int argc, char* argv[] ) { @@ -34,4 +33,3 @@ main( int argc, char* argv[] ) return result.wasSuccessful() ? 0 : 1; } - diff --git a/lib/tests/testRFC1035.cc b/lib/tests/testRFC1035.cc index 6902ff8c47..6e1228ce97 100644 --- a/lib/tests/testRFC1035.cc +++ b/lib/tests/testRFC1035.cc @@ -77,7 +77,6 @@ void testRFC1035::testBugPacketEndingOnCompressionPtr() int res = 0; unsigned int off = 0; - /* Test the HeaderUnpack function results */ msg = new rfc1035_message; res = rfc1035HeaderUnpack(buf, len, &off, msg); diff --git a/lib/tests/testRFC1738.cc b/lib/tests/testRFC1738.cc index 35d301c40a..b26d3f5742 100644 --- a/lib/tests/testRFC1738.cc +++ b/lib/tests/testRFC1738.cc @@ -61,7 +61,6 @@ void testRFC1738::testUrlDecode() CPPUNIT_ASSERT(memcmp(unescaped_str, "Bad String %1",14)==0); xfree(unescaped_str); - /* A partly corrupt string */ unescaped_str = xstrdup("Bad String %1A%3"); rfc1738_unescape(unescaped_str); @@ -97,7 +96,6 @@ void testRFC1738::testUrlEncode() result = rfc1738_do_escape("################ ################ ################ ################ ################ ################ ################ ################", RFC1738_ESCAPE_UNSAFE); CPPUNIT_ASSERT(memcmp(result, "%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%20%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%20%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%20%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%20%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%20%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%20%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%20%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23",406)==0); - /* TEST: escaping only reserved characters */ /* regular URL (full encoding requested) */ @@ -108,7 +106,6 @@ void testRFC1738::testUrlEncode() result = rfc1738_do_escape("/data/source/path", RFC1738_ESCAPE_RESERVED); CPPUNIT_ASSERT(memcmp(result, "%2Fdata%2Fsource%2Fpath",24)==0); - /* TEST: safety-escaping a string already partially escaped */ /* escaping of dangerous characters in a partially escaped string */ diff --git a/snmplib/asn1.c b/snmplib/asn1.c index def1fad362..4b5fd61780 100644 --- a/snmplib/asn1.c +++ b/snmplib/asn1.c @@ -83,7 +83,6 @@ #include "asn1.h" #include "snmp_api_error.h" - u_char * asn_build_header(u_char * data, /* IN - ptr to start of object */ int *datalength, /* IN/OUT - # of valid bytes */ @@ -95,7 +94,6 @@ asn_build_header(u_char * data, /* IN - ptr to start of object */ return (asn_build_header_with_truth(data, datalength, type, length, 0)); } - /* * asn_parse_int - pulls an int out of an ASN int type. * On entry, datalength is input as the number of valid bytes following @@ -453,7 +451,6 @@ asn_build_string(u_char * data, int *datalength, return (data + strlength); } - /* * asn_parse_header - interprets the ID and length of the current object. * On entry, datalength is input as the number of valid bytes following @@ -599,7 +596,6 @@ asn_parse_length(u_char * data, u_int * length) return (data + 1); } - u_char * asn_build_length(u_char * data, int *datalength, int length, int truth) diff --git a/snmplib/mib.c b/snmplib/mib.c index 7456e3f4a0..22dbe1da4f 100644 --- a/snmplib/mib.c +++ b/snmplib/mib.c @@ -99,7 +99,6 @@ init_mib(char *file) Mib = read_mib(file); } - static struct snmp_mib_tree * find_rfc1066_mib(struct snmp_mib_tree *root) { oid *op = RFC1066_MIB; diff --git a/snmplib/parse.c b/snmplib/parse.c index b1792ff163..02fe588e76 100644 --- a/snmplib/parse.c +++ b/snmplib/parse.c @@ -85,7 +85,6 @@ SOFTWARE. #include #endif - /* * This is one element of an object identifier with either an integer subidentifier, * or a textual string label, or both. @@ -163,7 +162,6 @@ struct tok { struct tok *next; /* pointer to next in hash table */ }; - struct tok tokens[] = { {"obsolete", sizeof("obsolete") - 1, OBSOLETE}, {"Opaque", sizeof("Opaque") - 1, SNMP_OPAQUE}, @@ -260,7 +258,6 @@ init_node_hash(struct node *nodes) } } - static void print_error(const char *string, const char *token, int type) { @@ -472,7 +469,6 @@ build_tree(struct node *nodes) { return tp; } - /* * Parses a token from the file. The type of the token parsed is returned, * and the text is placed in the string pointed to by token. @@ -613,7 +609,6 @@ getoid(register FILE *fp, register struct subid *SubOid, int length) } return count; - } static void @@ -971,7 +966,6 @@ parse_objecttype(register FILE *fp, char *name) { return np; } - /* * Parses a mib file and returns a linked list of nodes found in the file. * Returns NULL on error. diff --git a/snmplib/snmp_api.c b/snmplib/snmp_api.c index a512df5f5c..e587a51614 100644 --- a/snmplib/snmp_api.c +++ b/snmplib/snmp_api.c @@ -1,5 +1,4 @@ - /********************************************************************** * * Copyright 1997 by Carnegie Mellon University diff --git a/snmplib/snmp_api_error.c b/snmplib/snmp_api_error.c index 871765d67f..4257faafe7 100644 --- a/snmplib/snmp_api_error.c +++ b/snmplib/snmp_api_error.c @@ -35,7 +35,6 @@ #include #include "snmp_api_error.h" - /*************************************************************************** * ***************************************************************************/ @@ -62,7 +61,6 @@ static const char *api_errors[17] = { "Packet Error", "No Response From Host", - "Unknown Error" }; diff --git a/snmplib/snmp_error.c b/snmplib/snmp_error.c index 86a6c54bcf..93518ee68b 100644 --- a/snmplib/snmp_error.c +++ b/snmplib/snmp_error.c @@ -32,7 +32,6 @@ #include "snmp_error.h" - static const char *error_string[25] = { /* 0x00 - 0x05 */ "No Error", diff --git a/snmplib/snmp_msg.c b/snmplib/snmp_msg.c index 25d84dcff6..dca4921687 100644 --- a/snmplib/snmp_msg.c +++ b/snmplib/snmp_msg.c @@ -88,7 +88,6 @@ #include "snmp_pdu.h" #include "snmp_msg.h" - /* * RFC 1901: Introduction to Community-based SNMPv2 * diff --git a/snmplib/snmp_pdu.c b/snmplib/snmp_pdu.c index 8a7c2a437e..d5b4d4fdff 100644 --- a/snmplib/snmp_pdu.c +++ b/snmplib/snmp_pdu.c @@ -263,7 +263,6 @@ snmp_fix_pdu(struct snmp_pdu *pdu, int command) { return (newpdu); } - /**********************************************************************/ void diff --git a/snmplib/snmp_vars.c b/snmplib/snmp_vars.c index c5383bcccb..b4d3cb2f01 100644 --- a/snmplib/snmp_vars.c +++ b/snmplib/snmp_vars.c @@ -93,7 +93,6 @@ #include "util.h" - /* #define DEBUG_VARS 1 */ /* #define DEBUG_VARS_MALLOC 1 */ /* #define DEBUG_VARS_DECODE 1 */ @@ -362,9 +361,6 @@ snmp_var_EncodeVarBind(u_char * Buffer, int *BufLenP, return (bufp); } - - - /* Parse all Vars from the buffer */ u_char * snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen, diff --git a/src/AccessLogEntry.cc b/src/AccessLogEntry.cc index 3b646cc416..05a9d3179e 100644 --- a/src/AccessLogEntry.cc +++ b/src/AccessLogEntry.cc @@ -10,7 +10,6 @@ AccessLogEntry::SslDetails::SslDetails(): user(NULL), bumpMode(::Ssl::bumpEnd) } #endif /* USE_SSL */ - void AccessLogEntry::getLogClientIp(char *buf, size_t bufsz) const { diff --git a/src/AccessLogEntry.h b/src/AccessLogEntry.h index 5c0b82ba1f..e5cf612857 100644 --- a/src/AccessLogEntry.h +++ b/src/AccessLogEntry.h @@ -228,7 +228,6 @@ public: HttpRequest *request; //< virgin HTTP request HttpRequest *adapted_request; //< HTTP request after adaptation and redirection - #if ICAP_CLIENT /** \brief This subclass holds log info for ICAP part of request * \todo Inner class declarations should be moved outside diff --git a/src/AclRegs.cc b/src/AclRegs.cc index e644d95a77..2035f9015a 100644 --- a/src/AclRegs.cc +++ b/src/AclRegs.cc @@ -74,7 +74,6 @@ #include "ident/AclIdent.h" #endif - ACL::Prototype ACLBrowser::RegistryProtoype(&ACLBrowser::RegistryEntry_, "browser"); ACLStrategised ACLBrowser::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy::Instance(), "browser"); ACL::Prototype ACLDestinationDomain::LiteralRegistryProtoype(&ACLDestinationDomain::LiteralRegistryEntry_, "dstdomain"); diff --git a/src/BodyPipe.cc b/src/BodyPipe.cc index 4abd535943..e8962eb13f 100644 --- a/src/BodyPipe.cc +++ b/src/BodyPipe.cc @@ -98,7 +98,6 @@ BodyConsumerDialer::canDial(AsyncCall &call) return true; } - /* BodyProducer */ // inform the pipe that we are done and clear the Pointer @@ -111,8 +110,6 @@ void BodyProducer::stopProducingFor(RefCount &pipe, bool atEof) pipe = NULL; } - - /* BodyConsumer */ // inform the pipe that we are done and clear the Pointer @@ -124,7 +121,6 @@ void BodyConsumer::stopConsumingFrom(RefCount &pipe) pipe = NULL; } - /* BodyPipe */ BodyPipe::BodyPipe(Producer *aProducer): theBodySize(-1), @@ -406,7 +402,6 @@ BodyPipe::postAppend(size_t size) clearProducer(true); // reached end-of-body } - void BodyPipe::scheduleBodyDataNotification() { @@ -475,7 +470,6 @@ const char *BodyPipe::status() const return outputBuffer.content(); } - /* BodyPipeCheckout */ BodyPipeCheckout::BodyPipeCheckout(BodyPipe &aPipe): pipe(aPipe), @@ -503,7 +497,6 @@ BodyPipeCheckout::checkIn() checkedIn = true; } - BodyPipeCheckout::BodyPipeCheckout(const BodyPipeCheckout &c): pipe(c.pipe), buf(c.buf), offset(c.offset), checkedOutSize(c.checkedOutSize), checkedIn(c.checkedIn) diff --git a/src/CommCalls.cc b/src/CommCalls.cc index 99d3bd52a0..7c812a937b 100644 --- a/src/CommCalls.cc +++ b/src/CommCalls.cc @@ -37,7 +37,6 @@ CommCommonCbParams::print(std::ostream &os) const os << ", data=" << data; } - /* CommAcceptCbParams */ CommAcceptCbParams::CommAcceptCbParams(void *aData): @@ -83,7 +82,6 @@ CommIoCbParams::syncWithComm() return true; // now we are in sync and can handle the call } - void CommIoCbParams::print(std::ostream &os) const { @@ -94,7 +92,6 @@ CommIoCbParams::print(std::ostream &os) const } } - /* CommCloseCbParams */ CommCloseCbParams::CommCloseCbParams(void *aData): @@ -145,7 +142,6 @@ CommAcceptCbPtrFun::print(std::ostream &os) const os << ')'; } - /* CommConnectCbPtrFun */ CommConnectCbPtrFun::CommConnectCbPtrFun(CNCB *aHandler, @@ -169,7 +165,6 @@ CommConnectCbPtrFun::print(std::ostream &os) const os << ')'; } - /* CommIoCbPtrFun */ CommIoCbPtrFun::CommIoCbPtrFun(IOCB *aHandler, const CommIoCbParams &aParams): @@ -192,7 +187,6 @@ CommIoCbPtrFun::print(std::ostream &os) const os << ')'; } - /* CommCloseCbPtrFun */ CommCloseCbPtrFun::CommCloseCbPtrFun(CLCB *aHandler, diff --git a/src/CommCalls.h b/src/CommCalls.h index dd0612928c..acc21ac691 100644 --- a/src/CommCalls.h +++ b/src/CommCalls.h @@ -50,7 +50,6 @@ typedef void FDECB(const FdeCbParams ¶ms); * known to comm and there are many kinds of parameters. */ - /* Comm*CbParams classes below handle callback parameters */ // Maintains parameters common to all comm callbacks @@ -166,7 +165,6 @@ Params &GetCommParams(AsyncCall::Pointer &call) return dp->params; } - // All job dialers with comm parameters are merged into one since they // all have exactly one callback argument and differ in Params type only template @@ -198,7 +196,6 @@ protected: virtual void doDial() { ((&(*this->job))->*method)(this->params); } }; - // accept (IOACB) dialer class CommAcceptCbPtrFun: public CallDialer, public CommDialerParamsT @@ -234,7 +231,6 @@ public: CNCB *handler; }; - // read/write (IOCB) dialer class CommIoCbPtrFun: public CallDialer, public CommDialerParamsT @@ -251,7 +247,6 @@ public: IOCB *handler; }; - // close (CLCB) dialer class CommCloseCbPtrFun: public CallDialer, public CommDialerParamsT @@ -354,7 +349,6 @@ CommCbFunPtrCallT::CommCbFunPtrCallT(int aDebugSection, int aDebugLevel, { } - template bool CommCbFunPtrCallT::canFire() diff --git a/src/CommRead.h b/src/CommRead.h index da0d5c72e2..760492c70a 100644 --- a/src/CommRead.h +++ b/src/CommRead.h @@ -86,5 +86,4 @@ private: CbDataListContainer deferredReads; }; - #endif /* COMMREAD_H */ diff --git a/src/ConfigOption.h b/src/ConfigOption.h index 227b1502db..f8bb6ff4d3 100644 --- a/src/ConfigOption.h +++ b/src/ConfigOption.h @@ -37,7 +37,6 @@ class StoreEntry; /* for Vector<> */ #include "Array.h" - /* cache option parsers */ class ConfigOption diff --git a/src/CpuAffinity.cc b/src/CpuAffinity.cc index e84e29a5c0..b6649221fc 100644 --- a/src/CpuAffinity.cc +++ b/src/CpuAffinity.cc @@ -18,7 +18,6 @@ static CpuAffinitySet *TheCpuAffinitySet = NULL; - void CpuAffinityInit() { diff --git a/src/CpuAffinity.h b/src/CpuAffinity.h index fdd89cf8f3..e201c3e03e 100644 --- a/src/CpuAffinity.h +++ b/src/CpuAffinity.h @@ -15,5 +15,4 @@ SQUIDCEXTERN void CpuAffinityReconfigure(); /// check CPU affinity configuration and print warnings if needed SQUIDCEXTERN void CpuAffinityCheck(); - #endif // SQUID_CPU_AFFINITY_H diff --git a/src/CpuAffinityMap.cc b/src/CpuAffinityMap.cc index b4415a6b80..df3bd4f697 100644 --- a/src/CpuAffinityMap.cc +++ b/src/CpuAffinityMap.cc @@ -11,7 +11,6 @@ #include "CpuAffinitySet.h" #include "Debug.h" - bool CpuAffinityMap::add(const Vector &aProcesses, const Vector &aCores) { diff --git a/src/CpuAffinityMap.h b/src/CpuAffinityMap.h index 97c2d23e6c..0c05e03371 100644 --- a/src/CpuAffinityMap.h +++ b/src/CpuAffinityMap.h @@ -10,7 +10,6 @@ class CpuAffinitySet; - /// stores cpu_affinity_map configuration class CpuAffinityMap { diff --git a/src/CpuAffinitySet.cc b/src/CpuAffinitySet.cc index 5de3e17ec1..13fbf7d421 100644 --- a/src/CpuAffinitySet.cc +++ b/src/CpuAffinitySet.cc @@ -18,7 +18,6 @@ #include #endif - CpuAffinitySet::CpuAffinitySet() { CPU_ZERO(&theCpuSet); diff --git a/src/DiskIO/AIO/aio_win32.cc b/src/DiskIO/AIO/aio_win32.cc index 6f6ff03358..23b023e103 100644 --- a/src/DiskIO/AIO/aio_win32.cc +++ b/src/DiskIO/AIO/aio_win32.cc @@ -54,7 +54,6 @@ VOID CALLBACK IoCompletionRoutine(DWORD dwErrorCode, xfree(lpOverlapped); } - int aio_read(struct aiocb *aiocbp) { LPOVERLAPPED Overlapped; @@ -114,7 +113,6 @@ int aio_read(struct aiocb *aiocbp) return 0; } - int aio_read64(struct aiocb64 *aiocbp) { LPOVERLAPPED Overlapped; @@ -166,7 +164,6 @@ int aio_read64(struct aiocb64 *aiocbp) return 0; } - int aio_write(struct aiocb *aiocbp) { LPOVERLAPPED Overlapped; @@ -226,7 +223,6 @@ int aio_write(struct aiocb *aiocbp) return 0; } - int aio_write64(struct aiocb64 *aiocbp) { LPOVERLAPPED Overlapped; @@ -278,19 +274,16 @@ int aio_write64(struct aiocb64 *aiocbp) return 0; } - int aio_error(const struct aiocb * aiocbp) { return aiocbp->aio_sigevent.sigev_notify; } - int aio_error64(const struct aiocb64 * aiocbp) { return aiocbp->aio_sigevent.sigev_notify; } - int aio_open(const char *path, int mode) { HANDLE hndl; @@ -335,7 +328,6 @@ int aio_open(const char *path, int mode) return fd; } - void aio_close(int fd) { CloseHandle((HANDLE)_get_osfhandle(fd)); @@ -343,13 +335,11 @@ void aio_close(int fd) ++ statCounter.syscalls.disk.closes; } - ssize_t aio_return(struct aiocb * aiocbp) { return aiocbp->aio_sigevent.sigev_signo; } - ssize_t aio_return64(struct aiocb64 * aiocbp) { diff --git a/src/DiskIO/Blocking/BlockingDiskIOModule.cc b/src/DiskIO/Blocking/BlockingDiskIOModule.cc index c446359f94..aa012ffc1a 100644 --- a/src/DiskIO/Blocking/BlockingDiskIOModule.cc +++ b/src/DiskIO/Blocking/BlockingDiskIOModule.cc @@ -54,7 +54,6 @@ void BlockingDiskIOModule::shutdown() {} - DiskIOStrategy* BlockingDiskIOModule::createStrategy() { diff --git a/src/DiskIO/Blocking/BlockingFile.cc b/src/DiskIO/Blocking/BlockingFile.cc index 38e5b613af..6744a1ef41 100644 --- a/src/DiskIO/Blocking/BlockingFile.cc +++ b/src/DiskIO/Blocking/BlockingFile.cc @@ -105,7 +105,6 @@ BlockingFile::create(int flags, mode_t mode, RefCount callback) open(flags, mode, callback); } - void BlockingFile::doClose() { if (fd > -1) { diff --git a/src/DiskIO/DiskDaemon/DiskdAction.cc b/src/DiskIO/DiskDaemon/DiskdAction.cc index 009a6c7efd..b255ab16f4 100644 --- a/src/DiskIO/DiskDaemon/DiskdAction.cc +++ b/src/DiskIO/DiskDaemon/DiskdAction.cc @@ -15,7 +15,6 @@ #include "Store.h" #include "protos.h" - DiskdActionData::DiskdActionData() { xmemset(this, 0, sizeof(*this)); @@ -54,7 +53,6 @@ DiskdActionData::operator += (const DiskdActionData& stats) return *this; } - DiskdAction::Pointer DiskdAction::Create(const Mgr::CommandPointer &aCmd) { diff --git a/src/DiskIO/DiskDaemon/DiskdAction.h b/src/DiskIO/DiskDaemon/DiskdAction.h index e950824f89..871da30078 100644 --- a/src/DiskIO/DiskDaemon/DiskdAction.h +++ b/src/DiskIO/DiskDaemon/DiskdAction.h @@ -12,7 +12,6 @@ #include "mgr/forward.h" #include "mgr/Action.h" - /// store disk daemon stats class DiskdActionData { diff --git a/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc b/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc index 2f1b4952c7..d7e3c26326 100644 --- a/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc +++ b/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc @@ -318,7 +318,6 @@ DiskdIOStrategy::handle(diomsg * M) return; } - /* set errno passed from diskd. makes debugging more meaningful */ if (M->status < 0) errno = -M->status; @@ -537,7 +536,6 @@ DiskdIOStrategy::sync() } } - /* * Handle callbacks. If we have more than magic2 requests away, we block * until the queue is below magic2. Otherwise, we simply return when we diff --git a/src/DiskIO/DiskIOModule.h b/src/DiskIO/DiskIOModule.h index 058c10244d..4bacc24a17 100644 --- a/src/DiskIO/DiskIOModule.h +++ b/src/DiskIO/DiskIOModule.h @@ -84,5 +84,4 @@ private: static Vector *_Modules; }; - #endif /* SQUID_DISKIOMODULE_H */ diff --git a/src/DiskIO/DiskThreads/CommIO.h b/src/DiskIO/DiskThreads/CommIO.h index 92dba278cb..b19e0c6711 100644 --- a/src/DiskIO/DiskThreads/CommIO.h +++ b/src/DiskIO/DiskThreads/CommIO.h @@ -22,7 +22,6 @@ private: static int DoneReadFD; }; - /* Inline code. TODO: make structued approach to inlining */ void CommIO::NotifyIOCompleted() diff --git a/src/DiskIO/DiskThreads/DiskThreads.h b/src/DiskIO/DiskThreads/DiskThreads.h index 9b1fbd71e8..5c00e1f67d 100644 --- a/src/DiskIO/DiskThreads/DiskThreads.h +++ b/src/DiskIO/DiskThreads/DiskThreads.h @@ -119,5 +119,4 @@ struct AIOCounts { extern AIOCounts squidaio_counts; extern dlink_list used_list; - #endif diff --git a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc index 0edfb25637..4ee13011a0 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc +++ b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc @@ -33,7 +33,6 @@ * Copyright (c) 2003, Robert Collins */ - #include "squid.h" #include "DiskThreadsDiskFile.h" #include "DiskIO/IORequestor.h" diff --git a/src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.h b/src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.h index 0169deed6d..2b2be16c7a 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.h +++ b/src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.h @@ -52,5 +52,4 @@ private: static DiskThreadsDiskIOModule Instance; }; - #endif /* SQUID_DISKTHREADSDISKIOMODULE_H */ diff --git a/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc b/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc index d98ff8a1c3..da6101c5f5 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc +++ b/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc @@ -44,7 +44,6 @@ /* for statfs */ #include "Store.h" - void DiskThreadsIOStrategy::init(void) { diff --git a/src/DiskIO/DiskThreads/aiops.cc b/src/DiskIO/DiskThreads/aiops.cc index 686e411353..cada522b19 100644 --- a/src/DiskIO/DiskThreads/aiops.cc +++ b/src/DiskIO/DiskThreads/aiops.cc @@ -124,7 +124,6 @@ static void squidaio_poll_queues(void); static squidaio_thread_t *threads = NULL; static int squidaio_initialised = 0; - #define AIO_LARGE_BUFS 16384 #define AIO_MEDIUM_BUFS AIO_LARGE_BUFS >> 1 #define AIO_SMALL_BUFS AIO_LARGE_BUFS >> 2 @@ -636,7 +635,6 @@ squidaio_cleanup_request(squidaio_request_t * requestp) squidaio_request_pool->freeOne(requestp); } /* squidaio_cleanup_request */ - int squidaio_cancel(squidaio_result_t * resultp) { @@ -654,7 +652,6 @@ squidaio_cancel(squidaio_result_t * resultp) return 1; } /* squidaio_cancel */ - int squidaio_open(const char *path, int oflag, mode_t mode, squidaio_result_t * resultp) { @@ -682,7 +679,6 @@ squidaio_open(const char *path, int oflag, mode_t mode, squidaio_result_t * resu return 0; } - static void squidaio_do_open(squidaio_request_t * requestp) { @@ -690,7 +686,6 @@ squidaio_do_open(squidaio_request_t * requestp) requestp->err = errno; } - int squidaio_read(int fd, char *bufp, size_t bufs, off_t offset, int whence, squidaio_result_t * resultp) { @@ -721,7 +716,6 @@ squidaio_read(int fd, char *bufp, size_t bufs, off_t offset, int whence, squidai return 0; } - static void squidaio_do_read(squidaio_request_t * requestp) { @@ -730,7 +724,6 @@ squidaio_do_read(squidaio_request_t * requestp) requestp->err = errno; } - int squidaio_write(int fd, char *bufp, size_t bufs, off_t offset, int whence, squidaio_result_t * resultp) { @@ -761,7 +754,6 @@ squidaio_write(int fd, char *bufp, size_t bufs, off_t offset, int whence, squida return 0; } - static void squidaio_do_write(squidaio_request_t * requestp) { @@ -769,7 +761,6 @@ squidaio_do_write(squidaio_request_t * requestp) requestp->err = errno; } - int squidaio_close(int fd, squidaio_result_t * resultp) { @@ -792,7 +783,6 @@ squidaio_close(int fd, squidaio_result_t * resultp) return 0; } - static void squidaio_do_close(squidaio_request_t * requestp) { @@ -800,7 +790,6 @@ squidaio_do_close(squidaio_request_t * requestp) requestp->err = errno; } - int squidaio_stat(const char *path, struct stat *sb, squidaio_result_t * resultp) @@ -829,7 +818,6 @@ squidaio_stat(const char *path, struct stat *sb, squidaio_result_t * resultp) return 0; } - static void squidaio_do_stat(squidaio_request_t * requestp) { @@ -837,7 +825,6 @@ squidaio_do_stat(squidaio_request_t * requestp) requestp->err = errno; } - int squidaio_unlink(const char *path, squidaio_result_t * resultp) { @@ -861,7 +848,6 @@ squidaio_unlink(const char *path, squidaio_result_t * resultp) return 0; } - static void squidaio_do_unlink(squidaio_request_t * requestp) { diff --git a/src/DiskIO/DiskThreads/aiops_win32.cc b/src/DiskIO/DiskThreads/aiops_win32.cc index fecccc66ec..4e75cfd079 100644 --- a/src/DiskIO/DiskThreads/aiops_win32.cc +++ b/src/DiskIO/DiskThreads/aiops_win32.cc @@ -122,7 +122,6 @@ static void squidaio_poll_queues(void); static squidaio_thread_t *threads = NULL; static int squidaio_initialised = 0; - #define AIO_LARGE_BUFS 16384 #define AIO_MEDIUM_BUFS AIO_LARGE_BUFS >> 1 #define AIO_SMALL_BUFS AIO_LARGE_BUFS >> 2 @@ -721,7 +720,6 @@ squidaio_cleanup_request(squidaio_request_t * requestp) squidaio_request_pool->free(requestp); } /* squidaio_cleanup_request */ - int squidaio_cancel(squidaio_result_t * resultp) { @@ -739,7 +737,6 @@ squidaio_cancel(squidaio_result_t * resultp) return 1; } /* squidaio_cancel */ - int squidaio_open(const char *path, int oflag, mode_t mode, squidaio_result_t * resultp) { @@ -767,7 +764,6 @@ squidaio_open(const char *path, int oflag, mode_t mode, squidaio_result_t * resu return 0; } - static void squidaio_do_open(squidaio_request_t * requestp) { @@ -775,7 +771,6 @@ squidaio_do_open(squidaio_request_t * requestp) requestp->err = errno; } - int squidaio_read(int fd, char *bufp, size_t bufs, off_t offset, int whence, squidaio_result_t * resultp) { @@ -806,7 +801,6 @@ squidaio_read(int fd, char *bufp, size_t bufs, off_t offset, int whence, squidai return 0; } - static void squidaio_do_read(squidaio_request_t * requestp) { @@ -821,7 +815,6 @@ squidaio_do_read(squidaio_request_t * requestp) requestp->err = errno; } - int squidaio_write(int fd, char *bufp, size_t bufs, off_t offset, int whence, squidaio_result_t * resultp) { @@ -852,7 +845,6 @@ squidaio_write(int fd, char *bufp, size_t bufs, off_t offset, int whence, squida return 0; } - static void squidaio_do_write(squidaio_request_t * requestp) { @@ -865,7 +857,6 @@ squidaio_do_write(squidaio_request_t * requestp) requestp->err = errno; } - int squidaio_close(int fd, squidaio_result_t * resultp) { @@ -888,7 +879,6 @@ squidaio_close(int fd, squidaio_result_t * resultp) return 0; } - static void squidaio_do_close(squidaio_request_t * requestp) { @@ -900,7 +890,6 @@ squidaio_do_close(squidaio_request_t * requestp) requestp->err = errno; } - int squidaio_stat(const char *path, struct stat *sb, squidaio_result_t * resultp) @@ -929,7 +918,6 @@ squidaio_stat(const char *path, struct stat *sb, squidaio_result_t * resultp) return 0; } - static void squidaio_do_stat(squidaio_request_t * requestp) { @@ -937,7 +925,6 @@ squidaio_do_stat(squidaio_request_t * requestp) requestp->err = errno; } - int squidaio_unlink(const char *path, squidaio_result_t * resultp) { @@ -961,7 +948,6 @@ squidaio_unlink(const char *path, squidaio_result_t * resultp) return 0; } - static void squidaio_do_unlink(squidaio_request_t * requestp) { diff --git a/src/DiskIO/DiskThreads/async_io.cc b/src/DiskIO/DiskThreads/async_io.cc index b3a4ac1e5e..9f62a45ad7 100644 --- a/src/DiskIO/DiskThreads/async_io.cc +++ b/src/DiskIO/DiskThreads/async_io.cc @@ -129,7 +129,6 @@ aioCancel(int fd) } } - void aioWrite(int fd, off_t offset, char *bufp, size_t len, AIOCB * callback, void *callback_data, FREE * free_func) { @@ -158,7 +157,6 @@ aioWrite(int fd, off_t offset, char *bufp, size_t len, AIOCB * callback, void *c dlinkAdd(ctrlp, &ctrlp->node, &used_list); } /* aioWrite */ - void aioRead(int fd, off_t offset, size_t len, AIOCB * callback, void *callback_data) { diff --git a/src/DiskIO/IpcIo/IpcIoDiskIOModule.cc b/src/DiskIO/IpcIo/IpcIoDiskIOModule.cc index d0878e43e7..30598a3d1a 100644 --- a/src/DiskIO/IpcIo/IpcIoDiskIOModule.cc +++ b/src/DiskIO/IpcIo/IpcIoDiskIOModule.cc @@ -21,7 +21,6 @@ void IpcIoDiskIOModule::shutdown() {} - DiskIOStrategy* IpcIoDiskIOModule::createStrategy() { diff --git a/src/DiskIO/IpcIo/IpcIoFile.cc b/src/DiskIO/IpcIo/IpcIoFile.cc index 71a7ce7833..1f39c1ec37 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.cc +++ b/src/DiskIO/IpcIo/IpcIoFile.cc @@ -62,7 +62,6 @@ operator <<(std::ostream &os, const SipcIo &sio) (sio.msg.command == IpcIo::cmdRead ? 'r' : 'w') << sio.disker; } - IpcIoFile::IpcIoFile(char const *aDb): dbName(aDb), diskId(-1), error_(false), lastRequestId(0), olderRequests(&requestMap1), newerRequests(&requestMap2), @@ -585,7 +584,6 @@ IpcIoFile::getFD() const return -1; } - /* IpcIoMsg */ IpcIoMsg::IpcIoMsg(): @@ -617,8 +615,6 @@ IpcIoPendingRequest::completeIo(IpcIoMsg *const response) } } - - /* XXX: disker code that should probably be moved elsewhere */ static int TheFile = -1; ///< db file descriptor @@ -675,7 +671,6 @@ diskerWrite(IpcIoMsg &ipcIo) Ipc::Mem::PutPage(ipcIo.page); } - void IpcIoFile::DiskerHandleMoreRequests(void *source) { @@ -856,7 +851,6 @@ DiskerClose(const String &path) } } - /// reports our needs for shared memory pages to Ipc::Mem::Pages class IpcIoClaimMemoryNeedsRr: public RegisteredRunner { @@ -867,7 +861,6 @@ public: RunnerRegistrationEntry(rrClaimMemoryNeeds, IpcIoClaimMemoryNeedsRr); - void IpcIoClaimMemoryNeedsRr::run(const RunnerRegistry &) { @@ -881,7 +874,6 @@ IpcIoClaimMemoryNeedsRr::run(const RunnerRegistry &) static_cast(itemsCount * 1.1)); } - /// initializes shared memory segments used by IpcIoFile class IpcIoRr: public Ipc::Mem::RegisteredRunner { @@ -899,7 +891,6 @@ private: RunnerRegistrationEntry(rrAfterConfig, IpcIoRr); - void IpcIoRr::create(const RunnerRegistry &) { if (Config.cacheSwap.n_strands <= 0) diff --git a/src/DiskIO/IpcIo/IpcIoFile.h b/src/DiskIO/IpcIo/IpcIoFile.h index ea89620973..3d1409ad2b 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.h +++ b/src/DiskIO/IpcIo/IpcIoFile.h @@ -26,7 +26,6 @@ typedef enum { cmdNone, cmdOpen, cmdRead, cmdWrite } Command; } // namespace IpcIo - /// converts DiskIO requests to IPC queue messages class IpcIoMsg { @@ -140,7 +139,6 @@ private: CBDATA_CLASS2(IpcIoFile); }; - /// keeps original I/O request parameters while disker is handling the request class IpcIoPendingRequest { @@ -160,5 +158,4 @@ private: IpcIoPendingRequest &operator =(const IpcIoPendingRequest &d); // ditto }; - #endif /* SQUID_IPC_IOFILE_H */ diff --git a/src/DiskIO/Mmapped/MmappedDiskIOModule.cc b/src/DiskIO/Mmapped/MmappedDiskIOModule.cc index 841800446e..a75b7f4404 100644 --- a/src/DiskIO/Mmapped/MmappedDiskIOModule.cc +++ b/src/DiskIO/Mmapped/MmappedDiskIOModule.cc @@ -21,7 +21,6 @@ void MmappedDiskIOModule::shutdown() {} - DiskIOStrategy* MmappedDiskIOModule::createStrategy() { diff --git a/src/DiskIO/Mmapped/MmappedFile.cc b/src/DiskIO/Mmapped/MmappedFile.cc index 8e0084b421..b4a70d9359 100644 --- a/src/DiskIO/Mmapped/MmappedFile.cc +++ b/src/DiskIO/Mmapped/MmappedFile.cc @@ -46,7 +46,6 @@ private: void *buf; ///< buffer returned by mmap, needed for munmap }; - void * MmappedFile::operator new(size_t sz) { diff --git a/src/EventLoop.h b/src/EventLoop.h index 0ba0f0dd82..85c5200b5c 100644 --- a/src/EventLoop.h +++ b/src/EventLoop.h @@ -110,5 +110,4 @@ private: bool runOnceResult; /**< the result from runOnce */ }; - #endif /* SQUID_EVENTLOOP_H */ diff --git a/src/ExternalACL.h b/src/ExternalACL.h index be5e0cabe7..071c7a9493 100644 --- a/src/ExternalACL.h +++ b/src/ExternalACL.h @@ -65,7 +65,6 @@ public: static void ExternalAclLookup(ACLChecklist * ch, ACLExternal *); - ACLExternal(char const *); ACLExternal(ACLExternal const &); ~ACLExternal(); diff --git a/src/ExternalACLEntry.h b/src/ExternalACLEntry.h index d77c0a36b8..6ef7f1a6cd 100644 --- a/src/ExternalACLEntry.h +++ b/src/ExternalACLEntry.h @@ -71,7 +71,6 @@ public: String log; }; - /******************************************************************* * external_acl cache entry * Used opaqueue in the interface diff --git a/src/HttpBody.cc b/src/HttpBody.cc index 110d282d56..4c7e5afe99 100644 --- a/src/HttpBody.cc +++ b/src/HttpBody.cc @@ -37,7 +37,6 @@ #include "HttpBody.h" #include "MemBuf.h" - HttpBody::HttpBody() : mb(new MemBuf) {} diff --git a/src/HttpBody.h b/src/HttpBody.h index dc82a970aa..08bd93730c 100644 --- a/src/HttpBody.h +++ b/src/HttpBody.h @@ -74,5 +74,4 @@ private: MemBuf *mb; }; - #endif /* HTTPBODY_H_ */ diff --git a/src/HttpHdrCc.cc b/src/HttpHdrCc.cc index 9d5411633f..6971752a49 100644 --- a/src/HttpHdrCc.cc +++ b/src/HttpHdrCc.cc @@ -80,7 +80,6 @@ http_hdr_cc_type &operator++ (http_hdr_cc_type &aHeader) return aHeader; } - /// Module initialization hook void httpHdrCcInitModule(void) diff --git a/src/HttpHdrContRange.cc b/src/HttpHdrContRange.cc index f7d6b94a0a..730a8a9b2e 100644 --- a/src/HttpHdrContRange.cc +++ b/src/HttpHdrContRange.cc @@ -52,7 +52,6 @@ * entity-length = 1*DIGIT */ - /* local constants */ #define range_spec_unknown (-1) diff --git a/src/HttpHdrRange.cc b/src/HttpHdrRange.cc index db8ae7a592..6474fd90b2 100644 --- a/src/HttpHdrRange.cc +++ b/src/HttpHdrRange.cc @@ -58,7 +58,6 @@ * spec into type one above. (Canonization process). */ - /* local routines */ #define known_spec(s) ((s) > HttpHdrRangeSpec::UnknownPosition) @@ -362,7 +361,6 @@ HttpHdrRange::merge (Vector &basis) " specs, merged " << basis.size() - specs.size() << " specs"); } - void HttpHdrRange::getCanonizedSpecs (Vector ©) { diff --git a/src/HttpHdrSc.cc b/src/HttpHdrSc.cc index eac4a02549..133a092184 100644 --- a/src/HttpHdrSc.cc +++ b/src/HttpHdrSc.cc @@ -79,7 +79,6 @@ int operator - (http_hdr_sc_type const &anSc, http_hdr_sc_type const &anSc2) return (int)anSc - (int)anSc2; } - /* module initialization */ void @@ -249,7 +248,6 @@ HttpHdrSc::~HttpHdrSc() } } - HttpHdrSc::HttpHdrSc(const HttpHdrSc &sc) { dlink_node *node = sc.targets.head; diff --git a/src/HttpHdrScTarget.h b/src/HttpHdrScTarget.h index af881a6e52..99449db814 100644 --- a/src/HttpHdrScTarget.h +++ b/src/HttpHdrScTarget.h @@ -130,6 +130,4 @@ MEMPROXY_CLASS_INLINE(HttpHdrScTarget); extern void httpHdrScTargetStatDumper(StoreEntry * sentry, int idx, double val, double size, int count); - - #endif /* SQUID_HTTPHDRSURROGATECONTROLTARGET_H */ diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 9a29cb7be0..36e60b6c57 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -68,7 +68,6 @@ * An entry is a (field_id, field_name, field_value) triplet. */ - /* * local constants and vars */ @@ -172,7 +171,6 @@ http_hdr_type &operator++ (http_hdr_type &aHeader) return aHeader; } - /* * headers with field values defined as #(values) in HTTP/1.1 * Headers that are currently not recognized, are commented out. @@ -1699,7 +1697,6 @@ httpHeaderFldsPerHdrDumper(StoreEntry * sentry, int idx, double val, double size xpercent(count, dump_stat->destroyedCount)); } - static void httpHeaderStatDump(const HttpHeaderStat * hs, StoreEntry * e) { diff --git a/src/HttpHeader.h b/src/HttpHeader.h index cf0c336a43..53e884bc64 100644 --- a/src/HttpHeader.h +++ b/src/HttpHeader.h @@ -38,7 +38,6 @@ /* HttpHeader holds a HttpHeaderMask */ #include "HttpHeaderMask.h" - /* class forward declarations */ class HttpHdrContRange; class HttpHdrCc; @@ -46,7 +45,6 @@ class HttpHdrSc; class HttpHdrRange; class String; - /* constant attributes of http header fields */ /// recognized or "known" header fields; and the RFC which defines them (or not) @@ -187,7 +185,6 @@ struct _HttpHeaderFieldAttrs { field_type type; }; - /** Iteration for headers; use HttpHeaderPos as opaque type, do not interpret */ typedef ssize_t HttpHeaderPos; @@ -293,7 +290,6 @@ private: HttpHeaderEntry *findLastEntry(http_hdr_type id) const; }; - extern int httpHeaderParseQuotedString(const char *start, const int len, String *val); SQUIDCEXTERN int httpHeaderHasByNameListMember(const HttpHeader * hdr, const char *name, const char *member, const char separator); SQUIDCEXTERN void httpHeaderUpdate(HttpHeader * old, const HttpHeader * fresh, const HttpHeaderMask * denied_mask); diff --git a/src/HttpHeaderStat.h b/src/HttpHeaderStat.h index 7fcff9d045..ef3d616b7c 100644 --- a/src/HttpHeaderStat.h +++ b/src/HttpHeaderStat.h @@ -29,5 +29,4 @@ public: int busyDestroyedCount; }; - #endif /* HTTPHEADERSTAT_H_ */ diff --git a/src/HttpHeaderTools.cc b/src/HttpHeaderTools.cc index 35ead37d1d..d16d790ca8 100644 --- a/src/HttpHeaderTools.cc +++ b/src/HttpHeaderTools.cc @@ -60,7 +60,6 @@ static void httpHeaderPutStrvf(HttpHeader * hdr, http_hdr_type id, const char *fmt, va_list vargs); - HttpHeaderFieldInfo * httpHeaderBuildFieldsInfo(const HttpHeaderFieldAttrs * attrs, int count) { @@ -142,7 +141,6 @@ httpHeaderPutStrvf(HttpHeader * hdr, http_hdr_type id, const char *fmt, va_list mb.clean(); } - /** wrapper arrounf PutContRange */ void httpHeaderAddContRange(HttpHeader * hdr, HttpHdrRangeSpec spec, int64_t ent_len) @@ -154,7 +152,6 @@ httpHeaderAddContRange(HttpHeader * hdr, HttpHdrRangeSpec spec, int64_t ent_len) httpHdrContRangeDestroy(cr); } - /** * return true if a given directive is found in at least one of * the "connection" header-fields note: if HDR_PROXY_CONNECTION is @@ -342,7 +339,6 @@ httpHeaderParseOffset(const char *start, int64_t * value) return 1; } - /** * Parses a quoted-string field (RFC 2616 section 2.2), complains if * something went wrong, returns non-zero on success. diff --git a/src/HttpMsg.h b/src/HttpMsg.h index 81b33af0e5..6aa0adfd04 100644 --- a/src/HttpMsg.h +++ b/src/HttpMsg.h @@ -45,7 +45,6 @@ template class HttpMsgPointerT; - class HttpMsg { diff --git a/src/HttpParser.cc b/src/HttpParser.cc index eba3d4cc86..8193c0aebd 100644 --- a/src/HttpParser.cc +++ b/src/HttpParser.cc @@ -109,7 +109,6 @@ HttpParser::parseRequestFirstLine() // NP: we have now seen EOL, more-data (0) cannot occur. // From here on any failure is -1, success is 1 - // Input Validation: // Process what we now know about the line structure into field offsets diff --git a/src/HttpParser.h b/src/HttpParser.h index a29dca90cc..0541e27daf 100644 --- a/src/HttpParser.h +++ b/src/HttpParser.h @@ -94,5 +94,4 @@ extern int HttpParserRequestLen(HttpParser *hp); #define HttpParserRequestLen(hp) ( (hp)->hdr_end - (hp)->req.start + 1 ) #endif - #endif /* _SQUID_SRC_HTTPPARSER_H */ diff --git a/src/HttpReply.cc b/src/HttpReply.cc index aac0bdb7e9..f0090e1d21 100644 --- a/src/HttpReply.cc +++ b/src/HttpReply.cc @@ -626,7 +626,6 @@ HttpReply::clone() const return rep; } - bool HttpReply::inheritProperties(const HttpMsg *aMsg) { const HttpReply *aRep = dynamic_cast(aMsg); diff --git a/src/HttpRequestMethod.h b/src/HttpRequestMethod.h index 86fa4e42f1..d811e31eeb 100644 --- a/src/HttpRequestMethod.h +++ b/src/HttpRequestMethod.h @@ -73,7 +73,6 @@ enum _method_t { METHOD_ENUM_END // MUST be last, (yuck) this is used as an array-initialization index constant! }; - /** * This class represents an HTTP Request METHOD * - i.e. PUT, POST, GET etc. diff --git a/src/HttpStatusLine.h b/src/HttpStatusLine.h index a77382915a..52a4c79ff2 100644 --- a/src/HttpStatusLine.h +++ b/src/HttpStatusLine.h @@ -79,5 +79,4 @@ SQUIDCEXTERN void httpStatusLinePackInto(const HttpStatusLine * sline, Packer * SQUIDCEXTERN const char *httpStatusString(http_status status); - #endif /* SQUID_HTTPSTATUSLINE_H */ diff --git a/src/ICP.h b/src/ICP.h index d718a8f206..a6a79af3e4 100644 --- a/src/ICP.h +++ b/src/ICP.h @@ -89,7 +89,6 @@ inline icp_opcode & operator++ (icp_opcode & aCode) return aCode; } - /** \ingroup ServerProtocolICPAPI \todo mempool this diff --git a/src/LeakFinder.cc b/src/LeakFinder.cc index e245430bf3..ac0d09f4f9 100644 --- a/src/LeakFinder.cc +++ b/src/LeakFinder.cc @@ -118,7 +118,6 @@ LeakFinder::hash(const void *p, unsigned int mod) return ((unsigned long) p >> 8) % mod; } - void LeakFinder::dump() { diff --git a/src/MemBlob.cc b/src/MemBlob.cc index b50d3d4f0d..1270c325d8 100644 --- a/src/MemBlob.cc +++ b/src/MemBlob.cc @@ -28,7 +28,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. */ - #include "squid.h" #include "base/TextException.h" #include "Debug.h" @@ -40,11 +39,9 @@ #include #endif - MemBlobStats MemBlob::Stats; InstanceIdDefinitions(MemBlob, "blob"); - /* MemBlobStats */ MemBlobStats::MemBlobStats(): alloc(0), live(0), append(0) @@ -63,7 +60,6 @@ MemBlobStats::dump(std::ostream &os) const return os; } - /* MemBlob */ MemBlob::MemBlob(const MemBlob::size_type reserveSize) : @@ -134,7 +130,6 @@ MemBlob::append(const char *source, const size_type n) ++Stats.append; } - const MemBlobStats& MemBlob::GetStats() { diff --git a/src/MemBlob.h b/src/MemBlob.h index 9cdbd0a2df..86d54c13a9 100644 --- a/src/MemBlob.h +++ b/src/MemBlob.h @@ -53,7 +53,6 @@ public: uint64_t liveBytes; ///< the total size of currently allocated storage }; - /** Refcountable, fixed-size, content-agnostic memory buffer. * * Allocated memory block is divided into two sequential areas: diff --git a/src/MemBuf.cc b/src/MemBuf.cc index ed14d1a4a4..b953da0c79 100644 --- a/src/MemBuf.cc +++ b/src/MemBuf.cc @@ -128,7 +128,6 @@ MemBuf::init() init(MEM_BUF_INIT_SIZE, MEM_BUF_MAX_SIZE); } - /** init with specific sizes */ void MemBuf::init(mb_size_t szInit, mb_size_t szMax) @@ -286,7 +285,6 @@ MemBuf::Printf(const char *fmt,...) va_end(args); } - /** * vPrintf for other printf()'s to use; calls vsnprintf, extends buf if needed */ @@ -403,7 +401,6 @@ MemBuf::grow(mb_size_t min_cap) PROF_stop(MemBuf_grow); } - /* Reports */ /** diff --git a/src/MemObject.cc b/src/MemObject.cc index d38d8d563e..61a7a26b77 100644 --- a/src/MemObject.cc +++ b/src/MemObject.cc @@ -293,7 +293,6 @@ MemObject::reset() /* Should we check for clients? */ } - int64_t MemObject::lowestMemReaderOffset() const { @@ -408,7 +407,6 @@ MemObject::trimUnSwappable() inmem_lo = new_mem_lo; } - bool MemObject::isContiguous() const { diff --git a/src/MemObject.h b/src/MemObject.h index a24eb40034..fdad17eb51 100644 --- a/src/MemObject.h +++ b/src/MemObject.h @@ -92,7 +92,6 @@ public: DelayId mostBytesAllowed() const; #endif - #if URL_CHECKSUM_DEBUG void checkUrlChecksum() const; diff --git a/src/MemStore.cc b/src/MemStore.cc index a1162d053f..648ce1b8df 100644 --- a/src/MemStore.cc +++ b/src/MemStore.cc @@ -399,7 +399,6 @@ MemStore::EntryLimit() return entryLimit; } - /// reports our needs for shared memory pages to Ipc::Mem::Pages class MemStoreClaimMemoryNeedsRr: public RegisteredRunner { @@ -410,14 +409,12 @@ public: RunnerRegistrationEntry(rrClaimMemoryNeeds, MemStoreClaimMemoryNeedsRr); - void MemStoreClaimMemoryNeedsRr::run(const RunnerRegistry &) { Ipc::Mem::NotePageNeed(Ipc::Mem::PageId::cachePage, MemStore::EntryLimit()); } - /// decides whether to use a shared memory cache or checks its configuration class MemStoreCfgRr: public ::RegisteredRunner { @@ -446,7 +443,6 @@ void MemStoreCfgRr::run(const RunnerRegistry &r) } } - /// initializes shared memory segments used by MemStore class MemStoreRr: public Ipc::Mem::RegisteredRunner { @@ -465,7 +461,6 @@ private: RunnerRegistrationEntry(rrAfterConfig, MemStoreRr); - void MemStoreRr::run(const RunnerRegistry &r) { assert(Config.memShared.configured()); diff --git a/src/Packer.cc b/src/Packer.cc index 4e50d1a5ad..c395006d69 100644 --- a/src/Packer.cc +++ b/src/Packer.cc @@ -65,12 +65,10 @@ * */ - /* * To-Do: */ - #include "squid.h" #include "Store.h" #include "MemBuf.h" @@ -111,7 +109,6 @@ storeEntryAppend(StoreEntry *e, const char *buf, int len) e->append(buf, len); } - /* append()'s */ static void (*const store_append) (StoreEntry *, const char *, int) = &storeEntryAppend; static void (*const memBuf_append) (MemBuf *, const char *, mb_size_t) = &memBufAppend; @@ -120,7 +117,6 @@ static void (*const memBuf_append) (MemBuf *, const char *, mb_size_t) = &memBuf static void (*const store_vprintf) (StoreEntry *, const char *, va_list ap) = &storeAppendVPrintf; static void (*const memBuf_vprintf) (MemBuf *, const char *, va_list ap) = &memBufVPrintf; - /* init/clean */ /* init with this to forward data to StoreEntry */ diff --git a/src/Packer.h b/src/Packer.h index 761cc99d93..f153614866 100644 --- a/src/Packer.h +++ b/src/Packer.h @@ -45,7 +45,6 @@ typedef void (*ObjPackMethod) (void *obj, Packer * p); typedef void (*append_f) (void *, const char *buf, int size); typedef void (*vprintf_f) (void *, const char *fmt, va_list args); - class Packer { diff --git a/src/PeerSelectState.h b/src/PeerSelectState.h index 639f041a4f..63c76b2e5a 100644 --- a/src/PeerSelectState.h +++ b/src/PeerSelectState.h @@ -108,5 +108,4 @@ private: CBDATA_CLASS(ps_state); }; - #endif /* SQUID_PEERSELECTSTATE_H */ diff --git a/src/RemovalPolicy.h b/src/RemovalPolicy.h index bc45f2171e..00a825e8fa 100644 --- a/src/RemovalPolicy.h +++ b/src/RemovalPolicy.h @@ -103,5 +103,4 @@ extern RemovalPolicy *createRemovalPolicy(RemovalPolicySettings * settings); typedef RemovalPolicy *REMOVALPOLICYCREATE(wordlist * args); - #endif /* SQUID_REMOVALPOLICY_H */ diff --git a/src/Server.cc b/src/Server.cc index 2c00478262..927245b4ae 100644 --- a/src/Server.cc +++ b/src/Server.cc @@ -58,7 +58,6 @@ // implemented in client_side_reply.cc until sides have a common parent extern void purgeEntriesByUrl(HttpRequest * req, const char *url); - ServerStateData::ServerStateData(FwdState *theFwdState): AsyncJob("ServerStateData"), requestSender(NULL), #if USE_ADAPTATION @@ -127,7 +126,6 @@ ServerStateData::swanSong() #endif } - HttpReply * ServerStateData::virginReply() { @@ -310,7 +308,6 @@ ServerStateData::noteBodyProducerAborted(BodyPipe::Pointer bp) handleRequestBodyProducerAborted(); } - // more origin request body data is available void ServerStateData::handleMoreRequestBodyAvailable() @@ -813,7 +810,6 @@ ServerStateData::handleAdaptationCompleted() completeForwarding(); } - // common part of noteAdaptation*Aborted and noteBodyConsumerAborted methods void ServerStateData::handleAdaptationAborted(bool bypassable) diff --git a/src/SquidNew.cc b/src/SquidNew.cc index 22aebfc71e..040855cd14 100644 --- a/src/SquidNew.cc +++ b/src/SquidNew.cc @@ -37,7 +37,6 @@ #include "squid.h" - #ifdef __SUNPRO_CC #include diff --git a/src/SquidString.h b/src/SquidString.h index 929fd4ffa0..901848f732 100644 --- a/src/SquidString.h +++ b/src/SquidString.h @@ -45,7 +45,6 @@ #define SQUIDSTRINGPRINT(s) (s).psize(),(s).rawBuf() #endif /* SQUIDSTRINGPH */ - #define DEBUGSTRINGS 0 #if DEBUGSTRINGS #include "splay.h" @@ -159,7 +158,6 @@ public: void stat (StoreEntry *) const; #endif - private: void allocAndFill(const char *str, int len); void allocBuffer(size_type sz); diff --git a/src/StatCounters.h b/src/StatCounters.h index 6ff3ec1fa6..3152076819 100644 --- a/src/StatCounters.h +++ b/src/StatCounters.h @@ -47,7 +47,6 @@ public: }; #endif - /** General collection of process-wide statistics. * * \note if you add a field to StatCounters, diff --git a/src/StatHist.h b/src/StatHist.h index dfcc304ce6..8f28ae4496 100644 --- a/src/StatHist.h +++ b/src/StatHist.h @@ -32,7 +32,6 @@ /* for StoreEntry */ #include "Store.h" - /// function signature for in/out StatHist adaptation typedef double hbase_f(double); diff --git a/src/Store.h b/src/Store.h index ee0079dfd5..8d24215751 100644 --- a/src/Store.h +++ b/src/Store.h @@ -55,7 +55,6 @@ #include #endif - class AsyncCall; class HttpRequest; class MemObject; @@ -254,14 +253,12 @@ private: void trimMemory(const bool preserveSwappable) {} - static NullStoreEntry _instance; }; /// \ingroup StoreAPI typedef void (*STOREGETCLIENT) (StoreEntry *, void *cbdata); - /** \ingroup StoreAPI * Abstract base class that will replace the whole store and swapdir interface. diff --git a/src/StoreClient.h b/src/StoreClient.h index 78a2c01ce6..72b204299a 100644 --- a/src/StoreClient.h +++ b/src/StoreClient.h @@ -129,5 +129,4 @@ private: SQUIDCEXTERN void storeClientCopy(store_client *, StoreEntry *, StoreIOBuffer, STCB *, void *); - #endif /* SQUID_STORECLIENT_H */ diff --git a/src/StoreFileSystem.h b/src/StoreFileSystem.h index 9db8237b63..bde0eb9294 100644 --- a/src/StoreFileSystem.h +++ b/src/StoreFileSystem.h @@ -146,5 +146,4 @@ private: // TODO: Kill this typedef! typedef StoreFileSystem storefs_entry_t; - #endif /* SQUID_STOREFILESYSTEM_H */ diff --git a/src/StoreMeta.cc b/src/StoreMeta.cc index 379c4f48d6..93361ad436 100644 --- a/src/StoreMeta.cc +++ b/src/StoreMeta.cc @@ -111,7 +111,6 @@ StoreMeta::validLength(int aLength) const return true; } - StoreMeta * StoreMeta::Factory (char type, size_t len, void const *value) { diff --git a/src/StoreStats.cc b/src/StoreStats.cc index ac950e1fc2..371d4184d3 100644 --- a/src/StoreStats.cc +++ b/src/StoreStats.cc @@ -9,7 +9,6 @@ #include "protos.h" /* for xmemset only */ #include "StoreStats.h" - /* StoreInfoStats */ StoreInfoStats::StoreInfoStats() @@ -51,8 +50,6 @@ StoreInfoStats::operator +=(const StoreInfoStats &stats) return *this; } - - /* StoreIoStats */ StoreIoStats::StoreIoStats() diff --git a/src/StoreStats.h b/src/StoreStats.h index 9be6f67a20..ea2f4bbe6b 100644 --- a/src/StoreStats.h +++ b/src/StoreStats.h @@ -34,11 +34,9 @@ public: bool shared; ///< whether memory cache is shared among workers }; - StoreInfoStats(); StoreInfoStats &operator +=(const StoreInfoStats &stats); - Swap swap; ///< cache_mem stats Mem mem; ///< all cache_dirs stats diff --git a/src/StoreSwapLogData.h b/src/StoreSwapLogData.h index ab0276e2e9..7874e7419a 100644 --- a/src/StoreSwapLogData.h +++ b/src/StoreSwapLogData.h @@ -225,5 +225,4 @@ public: int32_t record_size; }; - #endif /* SQUID_STORESWAPLOGDATA_H */ diff --git a/src/String.cc b/src/String.cc index e737506dbe..23f4e9d343 100644 --- a/src/String.cc +++ b/src/String.cc @@ -51,7 +51,6 @@ String::psize() const return size(); } - // low-level buffer allocation, // does not free old buffer and does not adjust or look at len_ void @@ -264,7 +263,6 @@ String::substr(String::size_type from, String::size_type to) const return rv; } - #if DEBUGSTRINGS void String::stat(StoreEntry *entry) const @@ -497,8 +495,6 @@ String::rfind(char const ch) const return c-rawBuf(); } - - #if !_USE_INLINE_ #include "String.cci" #endif diff --git a/src/String.cci b/src/String.cci index ba8cda01df..c3f0784072 100644 --- a/src/String.cci +++ b/src/String.cci @@ -42,7 +42,6 @@ #endif /* INT_MAX */ #endif /* HAVE_STDINT_H */ - String::String() : size_(0), len_(0), buf_ (NULL) { #if DEBUGSTRINGS @@ -86,7 +85,6 @@ String::operator [](unsigned int aPos) const return buf_[aPos]; } - /// compare NULL and empty strings because str*cmp() may fail on NULL strings /// and because we need to return consistent results for strncmp(count == 0). bool @@ -105,7 +103,6 @@ String::nilCmp(const bool thisIsNilOrEmpty, const bool otherIsNilOrEmpty, int &r return true; } - int String::cmp (char const *aString) const { @@ -162,7 +159,6 @@ String::caseCmp(const String &str) const return caseCmp(str.rawBuf(),str.size()); } - void String::set(char const *loc, char const ch) { diff --git a/src/SwapDir.cc b/src/SwapDir.cc index 0fa81ef1db..983e2970d8 100644 --- a/src/SwapDir.cc +++ b/src/SwapDir.cc @@ -150,7 +150,6 @@ SwapDir::canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const return true; // kids may provide more tests and should report true load } - void SwapDir::sync() {} diff --git a/src/acl/Acl.cc b/src/acl/Acl.cc index 070ae7b6d9..922c982644 100644 --- a/src/acl/Acl.cc +++ b/src/acl/Acl.cc @@ -209,7 +209,6 @@ ACL::isProxyAuth() const return false; } - ACLList::ACLList() : op (1), _acl (NULL), next (NULL) {} @@ -341,7 +340,6 @@ ACLList::matches (ACLChecklist *checklist) const return true; } - /*********************/ /* Destroy functions */ /*********************/ diff --git a/src/acl/Acl.h b/src/acl/Acl.h index 2979a62d29..89eb909457 100644 --- a/src/acl/Acl.h +++ b/src/acl/Acl.h @@ -213,7 +213,6 @@ public: MEMPROXY_CLASS_INLINE(acl_proxy_auth_match_cache); - /// \ingroup ACLAPI extern const char *AclMatchedName; /* NULL */ diff --git a/src/acl/Arp.cc b/src/acl/Arp.cc index 20bc0ac64d..19278d50a0 100644 --- a/src/acl/Arp.cc +++ b/src/acl/Arp.cc @@ -49,7 +49,6 @@ static int aclMatchArp(SplayNode **dataptr, Ip::Address &c); static SplayNode::SPLAYCMP aclArpCompare; static SplayNode::SPLAYWALKEE aclDumpArpListWalkee; - ACL * ACLARP::clone() const { @@ -132,7 +131,6 @@ aclParseArpData(const char *t) return q; } - /*******************/ /* aclParseArpList */ /*******************/ diff --git a/src/acl/Asn.cc b/src/acl/Asn.cc index 60a074a2b9..04ba4375d3 100644 --- a/src/acl/Asn.cc +++ b/src/acl/Asn.cc @@ -56,7 +56,6 @@ /* BEGIN of definitions for radix tree entries */ - /* 32/128 bits address in memory with length */ class m_ADDR { @@ -114,7 +113,6 @@ static void asnCacheStart(int as); static STCB asHandleReply; - #if defined(__cplusplus) extern "C" { #endif @@ -233,7 +231,6 @@ asnStats(StoreEntry * sentry) /* PRIVATE */ - static void asnCacheStart(int as) { @@ -391,7 +388,6 @@ asStateFree(void *data) cbdataFree(asState); } - /** * add a network (addr, mask) to the radix tree, with matching AS number */ @@ -631,7 +627,6 @@ ACLSourceASNStrategy::Instance() ACLSourceASNStrategy ACLSourceASNStrategy::Instance_; - int ACLDestinationASNStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) { diff --git a/src/acl/Browser.cc b/src/acl/Browser.cc index 02fa8dcbab..4635a87f96 100644 --- a/src/acl/Browser.cc +++ b/src/acl/Browser.cc @@ -43,4 +43,3 @@ template class ACLRequestHeaderStrategy; - diff --git a/src/acl/Certificate.cc b/src/acl/Certificate.cc index 42d2b31218..7b24581a07 100644 --- a/src/acl/Certificate.cc +++ b/src/acl/Certificate.cc @@ -49,7 +49,6 @@ #include "fde.h" #include "globals.h" - int ACLCertificateStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) { diff --git a/src/acl/Checklist.cc b/src/acl/Checklist.cc index abacaa6e3c..5d50b2d07c 100644 --- a/src/acl/Checklist.cc +++ b/src/acl/Checklist.cc @@ -263,7 +263,6 @@ ACLChecklist::matchNodes(const ACLList * head, bool const fast) return true; } - /// Check whether a single ACL matches, returning NodeMatchingResult ACLChecklist::NodeMatchingResult ACLChecklist::matchNode(const ACLList &node, bool const fast) @@ -336,7 +335,6 @@ ACLChecklist::~ACLChecklist() debugs(28, 4, "ACLChecklist::~ACLChecklist: destroyed " << this); } - void ACLChecklist::AsyncState::changeState (ACLChecklist *checklist, AsyncState *newState) const { diff --git a/src/acl/Checklist.h b/src/acl/Checklist.h index c368f04caa..6569e7081c 100644 --- a/src/acl/Checklist.h +++ b/src/acl/Checklist.h @@ -86,7 +86,6 @@ public: static NullState _instance; }; - public: ACLChecklist(); virtual ~ACLChecklist(); diff --git a/src/acl/DestinationDomain.cc b/src/acl/DestinationDomain.cc index db961d09b6..fb754cac73 100644 --- a/src/acl/DestinationDomain.cc +++ b/src/acl/DestinationDomain.cc @@ -72,7 +72,6 @@ DestinationDomainLookup::LookupDone(const char *fqdn, const DnsLookupDetails &de checklist->matchNonBlocking(); } - int ACLDestinationDomainStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) { diff --git a/src/acl/DestinationIp.cc b/src/acl/DestinationIp.cc index 9e4c60429a..0f204e552e 100644 --- a/src/acl/DestinationIp.cc +++ b/src/acl/DestinationIp.cc @@ -111,8 +111,6 @@ DestinationIPLookup::LookupDone(const ipcache_addrs *, const DnsLookupDetails &d checklist->matchNonBlocking(); } - - ACL * ACLDestinationIP::clone() const { diff --git a/src/acl/DomainData.cc b/src/acl/DomainData.cc index 385d2142c8..071d0a29a6 100644 --- a/src/acl/DomainData.cc +++ b/src/acl/DomainData.cc @@ -81,7 +81,6 @@ aclHostDomainCompare( char *const &a, char * const &b) return matchDomainName(h, d); } - /* compare two domains */ template @@ -167,7 +166,6 @@ ACLDomainData::empty() const return domains->empty(); } - ACLData * ACLDomainData::clone() const { diff --git a/src/acl/Eui64.cc b/src/acl/Eui64.cc index 5ccd8842a8..c2e4145412 100644 --- a/src/acl/Eui64.cc +++ b/src/acl/Eui64.cc @@ -49,7 +49,6 @@ static int aclMatchEui(SplayNode **dataptr, Ip::Address &c); static SplayNode::SPLAYCMP aclEui64Compare; static SplayNode::SPLAYWALKEE aclDumpEuiListWalkee; - ACL * ACLEui64::clone() const { @@ -106,7 +105,6 @@ aclParseEuiData(const char *t) return q; } - /*******************/ /* aclParseEuiList */ /*******************/ diff --git a/src/acl/Eui64.h b/src/acl/Eui64.h index 34cdca4b24..1d8cfd5f88 100644 --- a/src/acl/Eui64.h +++ b/src/acl/Eui64.h @@ -41,7 +41,6 @@ namespace Eui class Eui64; }; - /// \ingroup ACLAPI class ACLEui64 : public ACL { diff --git a/src/acl/FilledChecklist.cc b/src/acl/FilledChecklist.cc index 47a9355099..eea3fd96ea 100644 --- a/src/acl/FilledChecklist.cc +++ b/src/acl/FilledChecklist.cc @@ -10,10 +10,8 @@ #include "auth/AclProxyAuth.h" #endif - CBDATA_CLASS_INIT(ACLFilledChecklist); - void * ACLFilledChecklist::operator new (size_t size) { @@ -30,7 +28,6 @@ ACLFilledChecklist::operator delete (void *address) cbdataFree(t); } - ACLFilledChecklist::ACLFilledChecklist() : dst_peer(NULL), dst_rdns(NULL), @@ -57,7 +54,6 @@ ACLFilledChecklist::ACLFilledChecklist() : rfc931[0] = '\0'; } - ACLFilledChecklist::~ACLFilledChecklist() { assert (!asyncInProgress()); @@ -80,7 +76,6 @@ ACLFilledChecklist::~ACLFilledChecklist() debugs(28, 4, HERE << "ACLFilledChecklist destroyed " << this); } - ConnStateData * ACLFilledChecklist::conn() const { diff --git a/src/acl/Gadgets.cc b/src/acl/Gadgets.cc index 58c14654e6..3733f9a9ee 100644 --- a/src/acl/Gadgets.cc +++ b/src/acl/Gadgets.cc @@ -49,7 +49,6 @@ #include "HttpRequest.h" #include "protos.h" - /* does name lookup, returns page_id */ err_type aclGetDenyInfoPage(acl_deny_info_list ** head, const char *name, int redirect_allowed) @@ -99,7 +98,6 @@ aclIsProxyAuth(const char *name) return false; } - /* maex@space.net (05.09.96) * get the info for redirecting "access denied" to info pages * TODO (probably ;-) @@ -235,8 +233,6 @@ aclParseAclList(ConfigParser &parser, ACLList ** head) } } - - /*********************/ /* Destroy functions */ /*********************/ diff --git a/src/acl/HierCode.cc b/src/acl/HierCode.cc index 70bf4f41ab..3072ca4e19 100644 --- a/src/acl/HierCode.cc +++ b/src/acl/HierCode.cc @@ -8,7 +8,6 @@ template class ACLStrategised; - int ACLHierCodeStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) { diff --git a/src/acl/HttpRepHeader.cc b/src/acl/HttpRepHeader.cc index 89ca1ecb05..659f60ef05 100644 --- a/src/acl/HttpRepHeader.cc +++ b/src/acl/HttpRepHeader.cc @@ -39,8 +39,6 @@ #include "acl/Checklist.h" #include "HttpReply.h" - - int ACLHTTPRepHeaderStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) { diff --git a/src/acl/HttpReqHeader.cc b/src/acl/HttpReqHeader.cc index 169d338356..1928b4d910 100644 --- a/src/acl/HttpReqHeader.cc +++ b/src/acl/HttpReqHeader.cc @@ -39,8 +39,6 @@ #include "acl/Checklist.h" #include "HttpRequest.h" - - int ACLHTTPReqHeaderStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) { diff --git a/src/acl/HttpStatus.cc b/src/acl/HttpStatus.cc index 03cb5d76b8..f419810233 100644 --- a/src/acl/HttpStatus.cc +++ b/src/acl/HttpStatus.cc @@ -85,8 +85,6 @@ int acl_httpstatus_data::compare(acl_httpstatus_data* const& a, acl_httpstatus_d return ret; } - - ACL * ACLHTTPStatus::clone() const { @@ -136,7 +134,6 @@ aclParseHTTPStatusData(const char *t) return new acl_httpstatus_data(status, INT_MAX); } - void ACLHTTPStatus::parse() { diff --git a/src/acl/Ip.cc b/src/acl/Ip.cc index 7aa3d05155..2faeb7991b 100644 --- a/src/acl/Ip.cc +++ b/src/acl/Ip.cc @@ -148,7 +148,6 @@ aclIpAddrNetworkCompare(acl_ip_data * const &p, acl_ip_data * const &q) } } - /* * acl_ip_data::NetworkCompare - Compare two acl_ip_data entries. Strictly * used by the splay insertion routine. It emits a warning if it diff --git a/src/acl/LocalIp.cc b/src/acl/LocalIp.cc index ab04b796ee..00a23d17be 100644 --- a/src/acl/LocalIp.cc +++ b/src/acl/LocalIp.cc @@ -49,9 +49,6 @@ ACLLocalIP::match(ACLChecklist *checklist) return ACLIP::match (Filled(checklist)->my_addr); } - - - ACL * ACLLocalIP::clone() const { diff --git a/src/acl/Method.cc b/src/acl/Method.cc index 5039967ee4..cea93665ed 100644 --- a/src/acl/Method.cc +++ b/src/acl/Method.cc @@ -43,8 +43,6 @@ template class ACLStrategised; - - int ACLMethodStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) { diff --git a/src/acl/PeerName.cc b/src/acl/PeerName.cc index e8c7e27919..0d7b584823 100644 --- a/src/acl/PeerName.cc +++ b/src/acl/PeerName.cc @@ -4,8 +4,6 @@ #include "acl/StringData.h" #include "acl/Checklist.h" - - int ACLPeerNameStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) { diff --git a/src/acl/Protocol.cc b/src/acl/Protocol.cc index 6d0a4e0a6e..b6a133d9fd 100644 --- a/src/acl/Protocol.cc +++ b/src/acl/Protocol.cc @@ -43,8 +43,6 @@ template class ACLStrategised; - - int ACLProtocolStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) { diff --git a/src/acl/Referer.cc b/src/acl/Referer.cc index 415903aa6a..607d827850 100644 --- a/src/acl/Referer.cc +++ b/src/acl/Referer.cc @@ -43,4 +43,3 @@ template class ACLRequestHeaderStrategy; - diff --git a/src/acl/ReplyMimeType.cc b/src/acl/ReplyMimeType.cc index 265be3efeb..d8fa119239 100644 --- a/src/acl/ReplyMimeType.cc +++ b/src/acl/ReplyMimeType.cc @@ -43,4 +43,3 @@ template class ACLReplyHeaderStrategy; - diff --git a/src/acl/RequestMimeType.cc b/src/acl/RequestMimeType.cc index d7f96dd3f3..b2542ac6b8 100644 --- a/src/acl/RequestMimeType.cc +++ b/src/acl/RequestMimeType.cc @@ -43,4 +43,3 @@ template class ACLRequestHeaderStrategy; - diff --git a/src/acl/SourceDomain.cc b/src/acl/SourceDomain.cc index 61ff7fb174..c4a1c6ab42 100644 --- a/src/acl/SourceDomain.cc +++ b/src/acl/SourceDomain.cc @@ -70,7 +70,6 @@ SourceDomainLookup::LookupDone(const char *fqdn, const DnsLookupDetails &details checklist->matchNonBlocking(); } - int ACLSourceDomainStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) { diff --git a/src/acl/SourceIp.cc b/src/acl/SourceIp.cc index 654dbade07..8712b6ed22 100644 --- a/src/acl/SourceIp.cc +++ b/src/acl/SourceIp.cc @@ -49,8 +49,6 @@ ACLSourceIP::match(ACLChecklist *checklist) return ACLIP::match(Filled(checklist)->src_addr); } - - ACL * ACLSourceIP::clone() const { diff --git a/src/acl/StringData.h b/src/acl/StringData.h index 587ac27d8c..aa4d593363 100644 --- a/src/acl/StringData.h +++ b/src/acl/StringData.h @@ -39,7 +39,6 @@ #include "acl/Acl.h" #include "acl/Data.h" - class ACLStringData : public ACLData { diff --git a/src/acl/Time.cc b/src/acl/Time.cc index d4007ec071..fcf28f292b 100644 --- a/src/acl/Time.cc +++ b/src/acl/Time.cc @@ -39,7 +39,6 @@ #include "acl/TimeData.h" #include "SquidTime.h" - int ACLTimeStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) { diff --git a/src/acl/UrlPort.cc b/src/acl/UrlPort.cc index e575c563f8..005c1985db 100644 --- a/src/acl/UrlPort.cc +++ b/src/acl/UrlPort.cc @@ -39,7 +39,6 @@ #include "acl/Checklist.h" #include "HttpRequest.h" - int ACLUrlPortStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) { diff --git a/src/acl/UserData.cc b/src/acl/UserData.cc index bcebedd4f9..387244b677 100644 --- a/src/acl/UserData.cc +++ b/src/acl/UserData.cc @@ -161,7 +161,6 @@ ACLUserData::parse() } } - bool ACLUserData::empty() const { diff --git a/src/adaptation/AccessRule.cc b/src/adaptation/AccessRule.cc index 8c9b53e816..03b9804bd1 100644 --- a/src/adaptation/AccessRule.cc +++ b/src/adaptation/AccessRule.cc @@ -49,7 +49,6 @@ Adaptation::AccessRule::group() return FindGroup(groupId); } - Adaptation::AccessRules & Adaptation::AllRules() { diff --git a/src/adaptation/Answer.cc b/src/adaptation/Answer.cc index cf80ada19d..5d9fe82ce8 100644 --- a/src/adaptation/Answer.cc +++ b/src/adaptation/Answer.cc @@ -24,7 +24,6 @@ Adaptation::Answer::Forward(HttpMsg *aMsg) return answer; } - Adaptation::Answer Adaptation::Answer::Block(const String &aRule) { diff --git a/src/adaptation/Config.cc b/src/adaptation/Config.cc index 9fc5fe9783..4db5a4e78d 100644 --- a/src/adaptation/Config.cc +++ b/src/adaptation/Config.cc @@ -54,7 +54,6 @@ int Adaptation::Config::send_username = false; int Adaptation::Config::use_indirect_client = true; Adaptation::Config::MetaHeaders Adaptation::Config::metaHeaders; - Adaptation::Config::MetaHeader::Value::~Value() { aclDestroyAclList(&aclList); @@ -101,7 +100,6 @@ Adaptation::Config::addMetaHeader(const String &headerName) return meta; } - Adaptation::ServiceConfig* Adaptation::Config::newServiceConfig() const { diff --git a/src/adaptation/Elements.cc b/src/adaptation/Elements.cc index 613ea0ed08..1b26c50f2a 100644 --- a/src/adaptation/Elements.cc +++ b/src/adaptation/Elements.cc @@ -27,7 +27,6 @@ Adaptation::methodStr(Adaptation::Method method) return "NONE"; } - const char * Adaptation::vectPointStr(Adaptation::VectPoint point) { @@ -48,4 +47,3 @@ Adaptation::vectPointStr(Adaptation::VectPoint point) return "NONE"; } - diff --git a/src/adaptation/History.cc b/src/adaptation/History.cc index 3c4c4ded0b..a775e2ad67 100644 --- a/src/adaptation/History.cc +++ b/src/adaptation/History.cc @@ -32,7 +32,6 @@ int Adaptation::History::Entry::rptm() return theRptm; } - Adaptation::History::History(): lastMeta(hoReply), allMeta(hoReply), diff --git a/src/adaptation/History.h b/src/adaptation/History.h index ffe3198f45..d9c714fe4c 100644 --- a/src/adaptation/History.h +++ b/src/adaptation/History.h @@ -10,7 +10,6 @@ namespace Adaptation { - /// collects information about adaptations related to a master transaction class History: public RefCountable { diff --git a/src/adaptation/Initiate.cc b/src/adaptation/Initiate.cc index c40dd5bfb9..68c2bca350 100644 --- a/src/adaptation/Initiate.cc +++ b/src/adaptation/Initiate.cc @@ -52,7 +52,6 @@ Adaptation::Initiate::initiator(const CbcPointer &i) theInitiator = i; } - // internal cleanup void Adaptation::Initiate::swanSong() { @@ -79,7 +78,6 @@ void Adaptation::Initiate::sendAnswer(const Answer &answer) clearInitiator(); } - void Adaptation::Initiate::tellQueryAborted(bool final) { sendAnswer(Answer::Error(final)); diff --git a/src/adaptation/Iterator.cc b/src/adaptation/Iterator.cc index 83302c78e3..bbd70f82ee 100644 --- a/src/adaptation/Iterator.cc +++ b/src/adaptation/Iterator.cc @@ -14,7 +14,6 @@ #include "HttpReply.h" #include "HttpMsg.h" - Adaptation::Iterator::Iterator( HttpMsg *aMsg, HttpRequest *aCause, const ServiceGroupPointer &aGroup): diff --git a/src/adaptation/Iterator.h b/src/adaptation/Iterator.h index c980edcf6d..c0d2958bbc 100644 --- a/src/adaptation/Iterator.h +++ b/src/adaptation/Iterator.h @@ -66,5 +66,4 @@ protected: } // namespace Adaptation - #endif /* SQUID_ADAPTATION__ITERATOR_H */ diff --git a/src/adaptation/Service.cc b/src/adaptation/Service.cc index dd297d8a91..730035db8d 100644 --- a/src/adaptation/Service.cc +++ b/src/adaptation/Service.cc @@ -51,7 +51,6 @@ Adaptation::Service::wants(const ServiceFilter &filter) const return true; } - Adaptation::Services & Adaptation::AllServices() { diff --git a/src/adaptation/ServiceConfig.cc b/src/adaptation/ServiceConfig.cc index 779a288ed6..ef81209326 100644 --- a/src/adaptation/ServiceConfig.cc +++ b/src/adaptation/ServiceConfig.cc @@ -250,7 +250,6 @@ Adaptation::ServiceConfig::grokUri(const char *value) return true; } - bool Adaptation::ServiceConfig::grokBool(bool &var, const char *name, const char *value) { diff --git a/src/adaptation/ServiceFilter.cc b/src/adaptation/ServiceFilter.cc index eb3965b89c..f7cd8d3989 100644 --- a/src/adaptation/ServiceFilter.cc +++ b/src/adaptation/ServiceFilter.cc @@ -3,7 +3,6 @@ #include "HttpReply.h" #include "adaptation/ServiceFilter.h" - Adaptation::ServiceFilter::ServiceFilter(Method aMethod, VectPoint aPoint, HttpRequest *aReq, HttpReply *aRep): method(aMethod), point(aPoint), request(HTTPMSGLOCK(aReq)), diff --git a/src/adaptation/ServiceGroups.cc b/src/adaptation/ServiceGroups.cc index 0838aad6e7..55802cb6eb 100644 --- a/src/adaptation/ServiceGroups.cc +++ b/src/adaptation/ServiceGroups.cc @@ -10,7 +10,6 @@ #include "protos.h" #include "wordlist.h" - Adaptation::ServiceGroup::ServiceGroup(const String &aKind, bool allSame): kind(aKind), method(methodNone), point(pointNone), allServicesSame(allSame) @@ -195,14 +194,12 @@ Adaptation::ServiceGroup::findLink(const ServiceFilter &filter, Pos &pos) const return !allServicesSame && findService(filter, pos); } - /* ServiceSet */ Adaptation::ServiceSet::ServiceSet(): ServiceGroup("adaptation set", true) { } - /* SingleService */ Adaptation::SingleService::SingleService(const String &aServiceId): @@ -212,14 +209,12 @@ Adaptation::SingleService::SingleService(const String &aServiceId): services.push_back(aServiceId); } - /* ServiceChain */ Adaptation::ServiceChain::ServiceChain(): ServiceGroup("adaptation chain", false) { } - /* DynamicServiceChain */ Adaptation::DynamicServiceChain::DynamicServiceChain( @@ -315,7 +310,6 @@ Adaptation::ServicePlan::print(std::ostream &os) const (atEof ? ".]" : "]"); } - /* globals */ Adaptation::Groups & diff --git a/src/adaptation/ServiceGroups.h b/src/adaptation/ServiceGroups.h index 8d46f9c66c..d53fb79dbf 100644 --- a/src/adaptation/ServiceGroups.h +++ b/src/adaptation/ServiceGroups.h @@ -108,7 +108,6 @@ public: DynamicGroupCfg ¤t, DynamicGroupCfg &future); }; - /** iterates services stored in a group; iteration is not linear because we need to both replace failed services and advance to the next chain link */ class ServicePlan @@ -146,7 +145,6 @@ typedef Vector Groups; extern Groups &AllGroups(); extern ServiceGroupPointer FindGroup(const ServiceGroup::Id &id); - } // namespace Adaptation #endif /* SQUID_ADAPTATION__SERVICE_GROUPS_H */ diff --git a/src/adaptation/ecap/Config.cc b/src/adaptation/ecap/Config.cc index d8b6bf77c7..34046ae1df 100644 --- a/src/adaptation/ecap/Config.cc +++ b/src/adaptation/ecap/Config.cc @@ -39,7 +39,6 @@ Adaptation::Ecap::Config::createService(const ServiceConfigPointer &cfg) return new Adaptation::Ecap::ServiceRep(cfg); } - /* ServiceConfig */ bool diff --git a/src/adaptation/ecap/Config.h b/src/adaptation/ecap/Config.h index f9b5a56fbb..b2b165cd51 100644 --- a/src/adaptation/ecap/Config.h +++ b/src/adaptation/ecap/Config.h @@ -29,7 +29,6 @@ public: Extensions extensions; }; - /// General eCAP configuration class Config: public Adaptation::Config { diff --git a/src/adaptation/ecap/Host.cc b/src/adaptation/ecap/Host.cc index 629ae1d230..df38fed72c 100644 --- a/src/adaptation/ecap/Host.cc +++ b/src/adaptation/ecap/Host.cc @@ -111,7 +111,6 @@ Adaptation::Ecap::Host::closeDebug(std::ostream *debug) Debug::finishDebug(); } - Adaptation::Ecap::Host::MessagePtr Adaptation::Ecap::Host::newRequest() const { diff --git a/src/adaptation/ecap/MessageRep.cc b/src/adaptation/ecap/MessageRep.cc index feb33e7bc4..ab52c2e454 100644 --- a/src/adaptation/ecap/MessageRep.cc +++ b/src/adaptation/ecap/MessageRep.cc @@ -111,7 +111,6 @@ Adaptation::Ecap::HeaderRep::TranslateHeaderId(const Name &name) return HDR_OTHER; } - /* FirstLineRep */ Adaptation::Ecap::FirstLineRep::FirstLineRep(HttpMsg &aMessage): theMessage(aMessage) @@ -193,7 +192,6 @@ Adaptation::Ecap::FirstLineRep::TranslateProtocolId(const Name &name) return AnyP::PROTO_UNKNOWN; } - /* RequestHeaderRep */ Adaptation::Ecap::RequestLineRep::RequestLineRep(HttpRequest &aMessage): @@ -284,7 +282,6 @@ Adaptation::Ecap::RequestLineRep::protocol(const Name &p) FirstLineRep::protocol(p); } - /* ReplyHeaderRep */ Adaptation::Ecap::StatusLineRep::StatusLineRep(HttpReply &aMessage): @@ -364,7 +361,6 @@ Adaptation::Ecap::BodyRep::bodySize() const return !theBody ? BodySize() : BodySize(theBody->bodySize()); } - /* MessageRep */ Adaptation::Ecap::MessageRep::MessageRep(HttpMsg *rawHeader): diff --git a/src/adaptation/ecap/MessageRep.h b/src/adaptation/ecap/MessageRep.h index 032537da03..9d55c2c62f 100644 --- a/src/adaptation/ecap/MessageRep.h +++ b/src/adaptation/ecap/MessageRep.h @@ -53,7 +53,6 @@ private: HttpMsg &theMessage; // the message being translated to libecap }; - // Helps translate Squid HttpMsg into libecap::FirstLine (see children). class FirstLineRep { @@ -123,7 +122,6 @@ private: HttpReply &theMessage; // the request header being translated to libecap }; - // Translates Squid BodyPipe into libecap::Body. class BodyRep: public libecap::Body { diff --git a/src/adaptation/ecap/ServiceRep.cc b/src/adaptation/ecap/ServiceRep.cc index 85eccecf15..260850591b 100644 --- a/src/adaptation/ecap/ServiceRep.cc +++ b/src/adaptation/ecap/ServiceRep.cc @@ -42,7 +42,6 @@ public: } // namespace Ecap } // namespace Adaptation - Adaptation::Ecap::ConfigRep::ConfigRep(const Master &aMaster): master(aMaster) { } @@ -77,8 +76,6 @@ Adaptation::Ecap::ConfigRep::visitEachOption(libecap::NamedValueVisitor &visitor visitor.visit(Name(i->first), Area::FromTempString(i->second)); } - - Adaptation::Ecap::ServiceRep::ServiceRep(const ServiceConfigPointer &cfg): /*AsyncJob("Adaptation::Ecap::ServiceRep"),*/ Adaptation::Service(cfg), isDetached(false) diff --git a/src/adaptation/ecap/XactionRep.cc b/src/adaptation/ecap/XactionRep.cc index 4a55190ad4..61473c9009 100644 --- a/src/adaptation/ecap/XactionRep.cc +++ b/src/adaptation/ecap/XactionRep.cc @@ -18,7 +18,6 @@ CBDATA_NAMESPACED_CLASS_INIT(Adaptation::Ecap::XactionRep, XactionRep); - /// a libecap Visitor for converting adapter transaction options to HttpHeader class OptionsExtractor: public libecap::NamedValueVisitor { @@ -464,7 +463,6 @@ Adaptation::Ecap::XactionRep::updateHistory(HttpMsg *adapted) adaptedReq->adaptHistoryImport(*request); } - void Adaptation::Ecap::XactionRep::vbDiscard() { @@ -678,7 +676,6 @@ Adaptation::Ecap::XactionRep::status() const if (vbProductionFinished) buf.append(".", 1); - buf.Printf(" A%d", static_cast(proxyingAb)); if (proxyingAb == opOn) { diff --git a/src/adaptation/icap/Client.h b/src/adaptation/icap/Client.h index 4bd6160b09..17b9c2b2f8 100644 --- a/src/adaptation/icap/Client.h +++ b/src/adaptation/icap/Client.h @@ -36,7 +36,6 @@ // ICAP-related things needed by code unaware of ICAP internals. - namespace Adaptation { namespace Icap @@ -45,7 +44,6 @@ namespace Icap extern void InitModule(); extern void CleanModule(); - } // namespace Icap } // namespace Adaptation diff --git a/src/adaptation/icap/Config.h b/src/adaptation/icap/Config.h index 587953aab2..2d4d6c8d4f 100644 --- a/src/adaptation/icap/Config.h +++ b/src/adaptation/icap/Config.h @@ -81,7 +81,6 @@ private: extern Config TheConfig; - } // namespace Icap } // namespace Adaptation diff --git a/src/adaptation/icap/Elements.h b/src/adaptation/icap/Elements.h index 1e9ad8e18c..d4627f7c4d 100644 --- a/src/adaptation/icap/Elements.h +++ b/src/adaptation/icap/Elements.h @@ -38,7 +38,6 @@ // ICAP-related things shared by many ICAP classes - namespace Adaptation { namespace Icap diff --git a/src/adaptation/icap/InOut.h b/src/adaptation/icap/InOut.h index de0c6c39c5..f497a0a029 100644 --- a/src/adaptation/icap/InOut.h +++ b/src/adaptation/icap/InOut.h @@ -43,7 +43,6 @@ // as the "cause". ICAP transactions use this class to store virgin // and adapted HTTP messages. - namespace Adaptation { namespace Icap @@ -90,7 +89,6 @@ public: // TODO: s/Header/Message/i ? - } // namespace Icap } // namespace Adaptation diff --git a/src/adaptation/icap/Launcher.cc b/src/adaptation/icap/Launcher.cc index 49f56a821e..23facedb28 100644 --- a/src/adaptation/icap/Launcher.cc +++ b/src/adaptation/icap/Launcher.cc @@ -15,7 +15,6 @@ #include "HttpRequest.h" #include "HttpReply.h" - Adaptation::Icap::Launcher::Launcher(const char *aTypeName, Adaptation::ServicePointer &aService): AsyncJob(aTypeName), diff --git a/src/adaptation/icap/Launcher.h b/src/adaptation/icap/Launcher.h index 166f5705d1..f9f55262cf 100644 --- a/src/adaptation/icap/Launcher.h +++ b/src/adaptation/icap/Launcher.h @@ -58,7 +58,6 @@ * ICAP transactions. */ - namespace Adaptation { namespace Icap @@ -136,5 +135,4 @@ operator <<(std::ostream &os, const XactAbortInfo &xai) } // namespace Icap } // namespace Adaptation - #endif /* SQUID_ICAPLAUNCHER_H */ diff --git a/src/adaptation/icap/ModXact.cc b/src/adaptation/icap/ModXact.cc index 49caee611b..cedd2a73f9 100644 --- a/src/adaptation/icap/ModXact.cc +++ b/src/adaptation/icap/ModXact.cc @@ -716,8 +716,6 @@ void Adaptation::Icap::ModXact::disableBypass(const char *reason, bool including } } - - // note that allocation for echoing is done in handle204NoContent() void Adaptation::Icap::ModXact::maybeAllocateHttpMsg() { @@ -1318,7 +1316,6 @@ void Adaptation::Icap::ModXact::finalizeLogInfo() Xaction::finalizeLogInfo(); } - void Adaptation::Icap::ModXact::makeRequestHeaders(MemBuf &buf) { char ntoabuf[MAX_IPSTRLEN]; @@ -1365,7 +1362,6 @@ void Adaptation::Icap::ModXact::makeRequestHeaders(MemBuf &buf) } } - buf.Printf("Encapsulated: "); MemBuf httpBuf; @@ -1785,7 +1781,6 @@ void Adaptation::Icap::ModXact::makeAdaptedBodyPipe(const char *what) adapted.body_pipe << " pipe"); } - // TODO: Move SizedEstimate and Preview elsewhere Adaptation::Icap::SizedEstimate::SizedEstimate() @@ -1814,8 +1809,6 @@ uint64_t Adaptation::Icap::SizedEstimate::size() const return static_cast(theData); } - - Adaptation::Icap::VirginBodyAct::VirginBodyAct(): theStart(0), theState(stUndecided) {} @@ -1847,7 +1840,6 @@ uint64_t Adaptation::Icap::VirginBodyAct::offset() const return static_cast(theStart); } - Adaptation::Icap::Preview::Preview(): theWritten(0), theAd(0), theState(stDisabled) {} diff --git a/src/adaptation/icap/ModXact.h b/src/adaptation/icap/ModXact.h index c5cc0f628c..4694d64a94 100644 --- a/src/adaptation/icap/ModXact.h +++ b/src/adaptation/icap/ModXact.h @@ -49,7 +49,6 @@ * receive the HTTP body. */ - class ChunkedCodingParser; namespace Adaptation @@ -106,7 +105,6 @@ private: State theState; }; - // maintains preview-related sizes class Preview @@ -365,7 +363,6 @@ private: CBDATA_CLASS2(ModXactLauncher); }; - } // namespace Icap } // namespace Adaptation diff --git a/src/adaptation/icap/OptXact.cc b/src/adaptation/icap/OptXact.cc index 4607d1543f..52a2b9200d 100644 --- a/src/adaptation/icap/OptXact.cc +++ b/src/adaptation/icap/OptXact.cc @@ -17,7 +17,6 @@ CBDATA_NAMESPACED_CLASS_INIT(Adaptation::Icap, OptXact); CBDATA_NAMESPACED_CLASS_INIT(Adaptation::Icap, OptXactLauncher); - Adaptation::Icap::OptXact::OptXact(Adaptation::Icap::ServiceRep::Pointer &aService): AsyncJob("Adaptation::Icap::OptXact"), Adaptation::Icap::Xaction("Adaptation::Icap::OptXact", aService), diff --git a/src/adaptation/icap/OptXact.h b/src/adaptation/icap/OptXact.h index d59fd28a5d..b20e2e430a 100644 --- a/src/adaptation/icap/OptXact.h +++ b/src/adaptation/icap/OptXact.h @@ -36,7 +36,6 @@ #include "adaptation/icap/Xaction.h" #include "adaptation/icap/Launcher.h" - namespace Adaptation { namespace Icap @@ -89,7 +88,6 @@ private: CBDATA_CLASS2(OptXactLauncher); }; - } // namespace Icap } // namespace Adaptation diff --git a/src/adaptation/icap/Options.cc b/src/adaptation/icap/Options.cc index f1db7cf216..60bca9ac08 100644 --- a/src/adaptation/icap/Options.cc +++ b/src/adaptation/icap/Options.cc @@ -155,7 +155,6 @@ void Adaptation::Icap::Options::cfgTransferList(const HttpHeader *h, TransferLis list.report(5, "Adaptation::Icap::Options::cfgTransferList: "); } - /* Adaptation::Icap::Options::TransferList */ Adaptation::Icap::Options::TransferList::TransferList(): extensions(NULL), name(NULL), diff --git a/src/adaptation/icap/Options.h b/src/adaptation/icap/Options.h index 641b3a6715..74552e0052 100644 --- a/src/adaptation/icap/Options.h +++ b/src/adaptation/icap/Options.h @@ -122,9 +122,6 @@ private: void cfgTransferList(const HttpHeader *h, TransferList &l); }; - - - } // namespace Icap } // namespace Adaptation diff --git a/src/adaptation/icap/ServiceRep.cc b/src/adaptation/icap/ServiceRep.cc index f789e2655a..82087c34ea 100644 --- a/src/adaptation/icap/ServiceRep.cc +++ b/src/adaptation/icap/ServiceRep.cc @@ -295,7 +295,6 @@ bool Adaptation::Icap::ServiceRep::availableForOld() const return (available != 0); // it is -1 (no limit) or has available slots } - bool Adaptation::Icap::ServiceRep::wantsUrl(const String &urlPath) const { Must(hasOptions()); @@ -331,7 +330,6 @@ bool Adaptation::Icap::ServiceRep::allows206() const return false; } - static void ServiceRep_noteTimeToUpdate(void *data) { @@ -492,7 +490,6 @@ void Adaptation::Icap::ServiceRep::checkOptions() } } - /* * Check the ICAP server's date header for clock skew */ diff --git a/src/adaptation/icap/ServiceRep.h b/src/adaptation/icap/ServiceRep.h index f39e2f4e6b..5fb346ca50 100644 --- a/src/adaptation/icap/ServiceRep.h +++ b/src/adaptation/icap/ServiceRep.h @@ -81,7 +81,6 @@ class OptXact; * auto-destroyed by refcounting when no longer used. */ - class ServiceRep : public RefCountable, public Adaptation::Service, public Adaptation::Initiator { diff --git a/src/adaptation/icap/Xaction.cc b/src/adaptation/icap/Xaction.cc index 9f0edbe6a3..7ead755492 100644 --- a/src/adaptation/icap/Xaction.cc +++ b/src/adaptation/icap/Xaction.cc @@ -25,7 +25,6 @@ #include "protos.h" #include "SquidTime.h" - //CBDATA_NAMESPACED_CLASS_INIT(Adaptation::Icap, Xaction); Adaptation::Icap::Xaction::Xaction(const char *aTypeName, Adaptation::Icap::ServiceRep::Pointer &aService): @@ -333,7 +332,6 @@ void Adaptation::Icap::Xaction::callException(const std::exception &e) Adaptation::Initiate::callException(e); } - void Adaptation::Icap::Xaction::callEnd() { if (doneWithIo()) { @@ -537,7 +535,6 @@ void Adaptation::Icap::Xaction::tellQueryAborted() } } - void Adaptation::Icap::Xaction::maybeLog() { if (IcapLogfileStatus == LOG_ENABLE) { diff --git a/src/adaptation/icap/Xaction.h b/src/adaptation/icap/Xaction.h index b28050069a..88b2bff4e5 100644 --- a/src/adaptation/icap/Xaction.h +++ b/src/adaptation/icap/Xaction.h @@ -193,7 +193,6 @@ private: //CBDATA_CLASS2(Xaction); }; - } // namespace Icap } // namespace Adaptation diff --git a/src/auth/User.cc b/src/auth/User.cc index 8e76310e8e..d9fde45130 100644 --- a/src/auth/User.cc +++ b/src/auth/User.cc @@ -80,7 +80,6 @@ Auth::User::credentials(CredentialState newCreds) credentials_state = newCreds; } - /** * Combine two user structs. ONLY to be called from within a scheme * module. The scheme module is responsible for ensuring that the diff --git a/src/auth/UserRequest.cc b/src/auth/UserRequest.cc index 15bdc5a9a8..c29b995e53 100644 --- a/src/auth/UserRequest.cc +++ b/src/auth/UserRequest.cc @@ -193,7 +193,6 @@ authenticateAuthUserRequestIPCount(Auth::UserRequest::Pointer auth_user_request) return auth_user_request->user()->ipcount; } - /* * authenticateUserAuthenticated: is this auth_user structure logged in ? */ diff --git a/src/auth/basic/auth_basic.cc b/src/auth/basic/auth_basic.cc index dde49bfe2c..d8cef00b72 100644 --- a/src/auth/basic/auth_basic.cc +++ b/src/auth/basic/auth_basic.cc @@ -36,7 +36,6 @@ * They DO NOT perform access control or auditing. * See acl.c for access control and client_side.c for auditing */ - #include "squid.h" #include "auth/basic/auth_basic.h" #include "auth/basic/Scheme.h" @@ -61,7 +60,6 @@ helper *basicauthenticators = NULL; static int authbasic_initialised = 0; - /* * * Public Functions diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index 48715c112c..c7713e84c5 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -36,7 +36,6 @@ * They DO NOT perform access control or auditing. * See acl.c for access control and client_side.c for auditing */ - #include "squid.h" #include "rfc2617.h" #include "auth/digest/auth_digest.h" @@ -678,7 +677,6 @@ Auth::Digest::Config::type() const return Auth::Digest::Scheme::GetInstance()->type(); } - static void authenticateDigestStats(StoreEntry * sentry) { @@ -920,7 +918,6 @@ Auth::Digest::Config::decode(char const *proxy_auth) temp.clean(); - /* now we validate the data given to us */ /* @@ -1035,7 +1032,6 @@ Auth::Digest::Config::decode(char const *proxy_auth) /* the method we'll check at the authenticate step as well */ - /* we don't send or parse opaques. Ok so we're flexable ... */ /* find the user */ diff --git a/src/auth/negotiate/auth_negotiate.cc b/src/auth/negotiate/auth_negotiate.cc index 5bd3f75f2c..a82f0f0f93 100644 --- a/src/auth/negotiate/auth_negotiate.cc +++ b/src/auth/negotiate/auth_negotiate.cc @@ -36,7 +36,6 @@ * They DO NOT perform access control or auditing. * See acl.c for access control and client_side.c for auditing */ - #include "squid.h" #include "auth/negotiate/auth_negotiate.h" #include "auth/Gadgets.h" diff --git a/src/auth/ntlm/auth_ntlm.cc b/src/auth/ntlm/auth_ntlm.cc index b4c2ea00e8..3547141851 100644 --- a/src/auth/ntlm/auth_ntlm.cc +++ b/src/auth/ntlm/auth_ntlm.cc @@ -36,7 +36,6 @@ * They DO NOT perform access control or auditing. * See acl.c for access control and client_side.c for auditing */ - #include "squid.h" #include "auth/Gadgets.h" #include "auth/ntlm/auth_ntlm.h" diff --git a/src/base/AsyncCall.cc b/src/base/AsyncCall.cc index 621353b503..eae5c72abf 100644 --- a/src/base/AsyncCall.cc +++ b/src/base/AsyncCall.cc @@ -11,7 +11,6 @@ InstanceIdDefinitions(AsyncCall, "call"); - /* AsyncCall */ AsyncCall::AsyncCall(int aDebugSection, int aDebugLevel, diff --git a/src/base/AsyncCall.h b/src/base/AsyncCall.h index 74f2864bae..4099408044 100644 --- a/src/base/AsyncCall.h +++ b/src/base/AsyncCall.h @@ -162,5 +162,4 @@ extern bool ScheduleCall(const char *fileName, int fileLine, AsyncCall::Pointer /** Call scheduling helper. */ #define ScheduleCallHere(call) ScheduleCall(__FILE__, __LINE__, (call)) - #endif /* SQUID_ASYNCCALL_H */ diff --git a/src/base/AsyncCallQueue.cc b/src/base/AsyncCallQueue.cc index ee899be624..b08b072d71 100644 --- a/src/base/AsyncCallQueue.cc +++ b/src/base/AsyncCallQueue.cc @@ -13,7 +13,6 @@ AsyncCallQueue *AsyncCallQueue::TheInstance = 0; - AsyncCallQueue::AsyncCallQueue(): theHead(NULL), theTail(NULL) { } diff --git a/src/base/AsyncJob.cc b/src/base/AsyncJob.cc index 34c5bc57ed..04f688d082 100644 --- a/src/base/AsyncJob.cc +++ b/src/base/AsyncJob.cc @@ -163,4 +163,3 @@ const char *AsyncJob::status() const return buf.content(); } - diff --git a/src/base/AsyncJobCalls.h b/src/base/AsyncJobCalls.h index c2c861f7c1..83eb888e03 100644 --- a/src/base/AsyncJobCalls.h +++ b/src/base/AsyncJobCalls.h @@ -51,7 +51,6 @@ CallJob(int debugSection, int debugLevel, const char *fileName, int fileLine, return ScheduleCall(fileName, fileLine, call); } - #define CallJobHere(debugSection, debugLevel, job, Class, method) \ CallJob((debugSection), (debugLevel), __FILE__, __LINE__, \ (#Class "::" #method), \ @@ -62,13 +61,11 @@ CallJob(int debugSection, int debugLevel, const char *fileName, int fileLine, (#Class "::" #method), \ JobMemFun((job), &Class::method, (arg1))) - /// Convenience macro to create a Dialer-based job callback #define JobCallback(dbgSection, dbgLevel, Dialer, job, method) \ asyncCall((dbgSection), (dbgLevel), #method, \ Dialer(CbcPointer(job), &method)) - /* * *MemFunT are member function (i.e., class method) wrappers. They store * details of a method call in an object so that the call can be delayed @@ -123,7 +120,6 @@ protected: // ... add more as needed - // Now we add global templated functions that create the member function // wrappers above. These are for convenience: it is often easier to // call a templated function than to create a templated object. @@ -143,7 +139,6 @@ JobMemFun(const CbcPointer &job, typename UnaryMemFunT::Method return UnaryMemFunT(job, method, arg1); } - // inlined methods template diff --git a/src/base/CbcPointer.h b/src/base/CbcPointer.h index ef93009e5f..9ae32f2fa6 100644 --- a/src/base/CbcPointer.h +++ b/src/base/CbcPointer.h @@ -158,5 +158,4 @@ std::ostream &CbcPointer::print(std::ostream &os) const return os << cbc << '/' << lock; } - #endif /* SQUID_CBC_POINTER_H */ diff --git a/src/base/InstanceId.h b/src/base/InstanceId.h index 942aa80cb6..d948b5cd08 100644 --- a/src/base/InstanceId.h +++ b/src/base/InstanceId.h @@ -48,7 +48,6 @@ private: return os << Prefix << value; \ } - /// print the id template inline @@ -57,5 +56,4 @@ std::ostream &operator <<(std::ostream &os, const InstanceId &id) return id.print(os); } - #endif /* SQUID_BASE_INSTANCE_ID_H */ diff --git a/src/base/RunnersRegistry.h b/src/base/RunnersRegistry.h index 2c08d243d8..8af8f33497 100644 --- a/src/base/RunnersRegistry.h +++ b/src/base/RunnersRegistry.h @@ -51,7 +51,6 @@ public: virtual void run(const RunnerRegistry &r) = 0; }; - /// registers a given runner with the given registry and returns registry count int RegisterRunner(const RunnerRegistry ®istry, RegisteredRunner *rr); @@ -60,7 +59,6 @@ int ActivateRegistered(const RunnerRegistry ®istry); /// deletes all runners in the given registry void DeactivateRegistered(const RunnerRegistry ®istry); - /// convenience function to "use" an otherwise unreferenced static variable bool UseThisStatic(const void *); diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 58a693b974..5b46c9bfb1 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -85,9 +85,6 @@ #include "snmp.h" #endif - - - #if HAVE_GLOB_H #include #endif @@ -623,7 +620,6 @@ parseConfigFile(const char *file_name) return err_count; } - static void configDoConfigure(void) { @@ -1095,7 +1091,6 @@ parseBytesLine64(int64_t * bptr, const char *units) self_destruct(); } - static void parseBytesLine(size_t * bptr, const char *units) { @@ -3303,7 +3298,6 @@ YesNoNone::operator void*() const return option > 0 ? (void*)this : NULL; } - inline void free_YesNoNone(YesNoNone *) { @@ -4247,7 +4241,6 @@ free_adaptation_meta_type(Adaptation::Config::MetaHeaders *) } #endif /* USE_ADAPTATION */ - #if ICAP_CLIENT static void @@ -4286,7 +4279,6 @@ parse_icap_access_type() #endif - #if USE_ECAP static void diff --git a/src/cache_diff.cc b/src/cache_diff.cc index 32c12c4c05..6dc0ffac0f 100644 --- a/src/cache_diff.cc +++ b/src/cache_diff.cc @@ -53,7 +53,6 @@ typedef struct { int bad_del_count; /* #dels with no prior add */ } CacheIndex; - typedef struct _CacheEntry { const cache_key *key; @@ -62,7 +61,6 @@ typedef struct _CacheEntry { unsigned char key_arr[SQUID_MD5_DIGEST_LENGTH]; } CacheEntry; - /* copied from url.c */ const char *RequestMethodStr[] = { "NONE", @@ -75,10 +73,8 @@ const char *RequestMethodStr[] = { "PURGE" }; - static int cacheIndexScan(CacheIndex * idx, const char *fname, FILE * file); - static CacheEntry * cacheEntryCreate(const StoreSwapLogData * s) { @@ -265,7 +261,6 @@ cacheIndexCmp(CacheIndex * idx1, CacheIndex * idx2) cacheIndexCmpReport(idx2, shared_count); } - static int usage(const char *prg_name) { diff --git a/src/cache_manager.cc b/src/cache_manager.cc index 0be3b44e3a..83445cfe0c 100644 --- a/src/cache_manager.cc +++ b/src/cache_manager.cc @@ -56,7 +56,6 @@ #include "wordlist.h" #include - /// \ingroup CacheManagerInternal #define MGR_PASSWD_SZ 128 @@ -77,7 +76,6 @@ private: Handler *handler; }; - /// Registers new profiles, ignoring attempts to register a duplicate void CacheManager::registerProfile(const Mgr::ActionProfile::Pointer &profile) diff --git a/src/cbdata.cc b/src/cbdata.cc index 59a639ad29..13fa76df5c 100644 --- a/src/cbdata.cc +++ b/src/cbdata.cc @@ -208,7 +208,6 @@ cbdata_hash(const void *p, unsigned int mod) } #endif - cbdata::~cbdata() { #if USE_CBDATA_DEBUG diff --git a/src/cbdata.h b/src/cbdata.h index bee15725ff..76ec4f2d19 100644 --- a/src/cbdata.h +++ b/src/cbdata.h @@ -276,7 +276,6 @@ extern int cbdataReferenceValid(const void *p); /// \ingroup CBDATAAPI extern cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, int size, FREE * free_func); - /* cbdata macros */ #if USE_CBDATA_DEBUG #define cbdataAlloc(type) ((type *)cbdataInternalAllocDbg(CBDATA_##type,__FILE__,__LINE__)) diff --git a/src/clientStream.cc b/src/clientStream.cc index 1744dabc17..0fc7fc2dc7 100644 --- a/src/clientStream.cc +++ b/src/clientStream.cc @@ -108,7 +108,6 @@ /// \ingroup ClientStreamInternal CBDATA_TYPE(clientStreamNode); - /* Local functions */ static FREE clientStreamFree; diff --git a/src/client_db.cc b/src/client_db.cc index 362c310aa4..24f63c861c 100644 --- a/src/client_db.cc +++ b/src/client_db.cc @@ -44,7 +44,6 @@ #include "StatCounters.h" #include "Store.h" - static hash_table *client_table = NULL; static ClientInfo *clientdbAdd(const Ip::Address &addr); diff --git a/src/client_side.cc b/src/client_side.cc index 0e6c8c75b0..7ca0a4bc55 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -182,7 +182,6 @@ static void clientListenerConnectionOpened(AnyP::PortCfg *s, const Ipc::FdNoteId /* our socket-related context */ - CBDATA_CLASS_INIT(ClientSocketContext); void * @@ -239,7 +238,6 @@ static void connNoteUseOfBuffer(ConnStateData* conn, size_t byteCount); static ConnStateData *connStateCreate(const Comm::ConnectionPointer &client, AnyP::PortCfg *port); - clientStreamNode * ClientSocketContext::getTail() const { @@ -275,7 +273,6 @@ ConnStateData::readSomeData() comm_read(clientConnection, in.addressToReadInto(), getAvailableBufferLength(), reader); } - void ClientSocketContext::removeFromConnectionList(ConnStateData * conn) { @@ -1807,7 +1804,6 @@ ClientSocketContext::noteIoError(const int xerrno) } } - void ClientSocketContext::doClose() { @@ -2723,7 +2719,6 @@ clientProcessRequest(ConnStateData *conn, HttpParser *hp, ClientSocketContext *c goto finish; } - if (!chunked && !clientIsContentLengthValid(request)) { clientStreamNode *node = context->getClientReplyContext(); clientReplyContext *repContext = dynamic_cast(node->data.getRaw()); @@ -3534,7 +3529,6 @@ clientNegotiateSSL(int fd, void *data) " client certificate: issuer: " << X509_NAME_oneline(X509_get_issuer_name(client_cert), 0, 0)); - X509_free(client_cert); } else { debugs(83, 5, "clientNegotiateSSL: FD " << fd << @@ -4287,7 +4281,6 @@ ConnStateData::stopReading() } } - BodyPipe::Pointer ConnStateData::expectRequestBody(int64_t size) { diff --git a/src/client_side.h b/src/client_side.h index 3ce723e1f0..d66395d003 100644 --- a/src/client_side.h +++ b/src/client_side.h @@ -163,7 +163,6 @@ private: CBDATA_CLASS(ClientSocketContext); }; - class ConnectionDetail; #if USE_SSL namespace Ssl diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 64b9cd46d8..d087b58b43 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -307,7 +307,6 @@ clientReplyContext::processExpired() } } - void clientReplyContext::sendClientUpstreamResponse() { @@ -1106,7 +1105,6 @@ clientReplyContext::storeNotOKTransferDone() const } } - /* A write has completed, what is the next status based on the * canonical request data? * 1 something is wrong @@ -1526,7 +1524,6 @@ clientReplyContext::buildReplyHeader() httpHdrMangleList(hdr, request, ROR_REPLY); } - void clientReplyContext::cloneReply() { @@ -1685,7 +1682,6 @@ clientGetMoreData(clientStreamNode * aNode, ClientHttpRequest * http) assert (context); assert(context->http == http); - clientStreamNode *next = ( clientStreamNode *)aNode->node.next->data; if (!context->ourNode) @@ -1993,7 +1989,6 @@ clientReplyContext::processReplyAccessResult(const allow_t &accessAllowed) startError(err); - return; } @@ -2153,8 +2148,6 @@ clientReplyContext::sendMoreData (StoreIOBuffer result) return; } - - /* Using this breaks the client layering just a little! */ void diff --git a/src/client_side_request.cc b/src/client_side_request.cc index ffbc2e48f4..919d2dfbdf 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -33,7 +33,6 @@ * */ - /* * General logic of request processing: * @@ -86,7 +85,6 @@ #include "ssl/ServerBump.h" #endif - #if LINGERING_CLOSE #define comm_close comm_lingering_close #endif diff --git a/src/client_side_request.h b/src/client_side_request.h index c1bfd29a7a..68640d0c21 100644 --- a/src/client_side_request.h +++ b/src/client_side_request.h @@ -27,7 +27,6 @@ * */ - #ifndef SQUID_CLIENTSIDEREQUEST_H #define SQUID_CLIENTSIDEREQUEST_H diff --git a/src/comm.cc b/src/comm.cc index 34efd3c9e2..b2bbad35c3 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -212,7 +212,6 @@ comm_empty_os_read_buffers(int fd) #endif } - /** * Return whether the FD has a pending completed callback. * NP: does not work. @@ -322,7 +321,6 @@ comm_read_cancel(int fd, AsyncCall::Pointer &callback) Comm::SetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0); } - /** * synchronous wrapper around udp socket functions */ @@ -361,7 +359,6 @@ comm_udp_send(int s, const void *buf, size_t len, int flags) return send(s, buf, len, flags); } - bool comm_has_incomplete_write(int fd) { @@ -1157,7 +1154,6 @@ _comm_close(int fd, char const *file, int line) comm_empty_os_read_buffers(fd); - AsyncCall::Pointer completeCall=commCbCall(5,4, "comm_close_complete", FdeCbPtrFun(comm_close_complete, NULL)); FdeCbParams &completeParams = GetCommParams(completeCall); @@ -1235,7 +1231,6 @@ comm_add_close_handler(int fd, AsyncCall::Pointer &call) fd_table[fd].closeHandler = call; } - // remove function-based close handler void comm_remove_close_handler(int fd, CLCB * handler, void *data) @@ -1933,7 +1928,6 @@ commHalfClosedReader(const Comm::ConnectionPointer &conn, char *, size_t size, c commPlanHalfClosedCheck(); // make sure this fd will be checked again } - CommRead::CommRead() : conn(NULL), buf(NULL), len(0), callback(NULL) {} CommRead::CommRead(const Comm::ConnectionPointer &c, char *buf_, int len_, AsyncCall::Pointer &callback_) diff --git a/src/comm.h b/src/comm.h index 191e123222..32dab7a09f 100644 --- a/src/comm.h +++ b/src/comm.h @@ -71,14 +71,12 @@ SQUIDCEXTERN int ignoreErrno(int); SQUIDCEXTERN void commCloseAllSockets(void); SQUIDCEXTERN void checkTimeouts(void); - //typedef void IOACB(int fd, int nfd, Comm::ConnectionPointer details, comm_err_t flag, int xerrno, void *data); extern void comm_add_close_handler(int fd, CLCB *, void *); extern void comm_add_close_handler(int fd, AsyncCall::Pointer &); extern void comm_remove_close_handler(int fd, CLCB *, void *); extern void comm_remove_close_handler(int fd, AsyncCall::Pointer &); - extern int comm_has_pending_read_callback(int fd); extern bool comm_monitors_read(int fd); //extern void comm_read(const Comm::ConnectionPointer &conn, char *buf, int len, IOCB *handler, void *data); diff --git a/src/comm/ModDevPoll.cc b/src/comm/ModDevPoll.cc index ba90476fec..e9ba660c12 100644 --- a/src/comm/ModDevPoll.cc +++ b/src/comm/ModDevPoll.cc @@ -100,7 +100,6 @@ static struct { int size; /**< maximum number of elements in array */ } devpoll_update; - /* STATIC VARIABLES */ static int devpoll_fd; /**< handle to /dev/poll device */ static int max_poll_time = 1000; /**< maximum milliseconds to spend in poll */ @@ -112,7 +111,6 @@ static int dpoll_nfds; /**< maximum number of poll results */ /* PROTOTYPES */ static void commDevPollRegisterWithCacheManager(void); - /* PRIVATE FUNCTIONS */ /** \brief Write batched file descriptor event changes to poll device * @@ -174,7 +172,6 @@ comm_update_fd(int fd, int events) devpoll_update.pfds[devpoll_update.cur].revents = 0; } - static void commIncomingStats(StoreEntry *sentry) { storeAppendPrintf(sentry, "Total number of devpoll loops: %ld\n", statCounter.select_loops); @@ -182,7 +179,6 @@ static void commIncomingStats(StoreEntry *sentry) statCounter.select_fds_hist.dump(sentry, statHistIntDumper); } - static void commDevPollRegisterWithCacheManager(void) { @@ -195,7 +191,6 @@ commDevPollRegisterWithCacheManager(void) ); } - /* PUBLIC FUNCTIONS */ /** \brief Initialise /dev/poll support @@ -319,7 +314,6 @@ Comm::SetSelect(int fd, unsigned int type, PF * handler, void *client_data, time F->timeout = squid_curtime + timeout; } - /** \brief Clear polling of file handle (both read and write) * * @param fd file descriptor to clear polling on @@ -331,7 +325,6 @@ Comm::ResetSelect(int fd) SetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0); } - /** \brief Do poll and trigger callback functions as appropriate * * Check all connections for new connections and input data that is to be diff --git a/src/comm/ModEpoll.cc b/src/comm/ModEpoll.cc index 08728f7fb0..c0e7ea8725 100644 --- a/src/comm/ModEpoll.cc +++ b/src/comm/ModEpoll.cc @@ -81,11 +81,9 @@ static struct epoll_event *pevents; static void commEPollRegisterWithCacheManager(void); - /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ /* Public functions */ - /* * This is a needed exported function which will be called to initialise * the network loop code. @@ -216,7 +214,6 @@ Comm::ResetSelect(int fd) SetSelect(fd, 0, NULL, NULL, 0); } - static void commIncomingStats(StoreEntry * sentry); static void diff --git a/src/comm/ModKqueue.cc b/src/comm/ModKqueue.cc index 449c24f3c8..f150d64e07 100644 --- a/src/comm/ModKqueue.cc +++ b/src/comm/ModKqueue.cc @@ -154,12 +154,9 @@ kq_update_events(int fd, short filter, PF * handler) } } - - /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ /* Public functions */ - /* * comm_select_init * diff --git a/src/comm/ModPoll.cc b/src/comm/ModPoll.cc index 6a6cbf0af8..d2d39e262b 100644 --- a/src/comm/ModPoll.cc +++ b/src/comm/ModPoll.cc @@ -143,7 +143,6 @@ static int incoming_tcp_interval = 16 << INCOMING_FACTOR; #define commCheckDnsIncoming (++dns_io_events > (incoming_dns_interval>> INCOMING_FACTOR)) #define commCheckTcpIncoming (++tcp_io_events > (incoming_tcp_interval>> INCOMING_FACTOR)) - void Comm::SetSelect(int fd, unsigned int type, PF * handler, void *client_data, time_t timeout) { @@ -592,7 +591,6 @@ Comm::DoSelect(int msec) return COMM_TIMEOUT; } - static void comm_poll_dns_incoming(void) { @@ -633,7 +631,6 @@ comm_poll_dns_incoming(void) statCounter.comm_dns_incoming.count(nevents); } - static void commPollRegisterWithCacheManager(void) { diff --git a/src/comm/ModSelect.cc b/src/comm/ModSelect.cc index 8a2c4a1781..27ab585dff 100644 --- a/src/comm/ModSelect.cc +++ b/src/comm/ModSelect.cc @@ -75,7 +75,6 @@ static void comm_select_dns_incoming(void); static void commUpdateReadBits(int fd, PF * handler); static void commUpdateWriteBits(int fd, PF * handler); - static struct timeval zero_tv; static fd_set global_readfds; static fd_set global_writefds; @@ -764,7 +763,6 @@ examine_select(fd_set * readfds, fd_set * writefds) return 0; } - static void commIncomingStats(StoreEntry * sentry) { diff --git a/src/comm/ModSelectWin32.cc b/src/comm/ModSelectWin32.cc index 18f8d3bfbd..6a54b6a129 100644 --- a/src/comm/ModSelectWin32.cc +++ b/src/comm/ModSelectWin32.cc @@ -70,7 +70,6 @@ static void comm_select_dns_incoming(void); static void commUpdateReadBits(int fd, PF * handler); static void commUpdateWriteBits(int fd, PF * handler); - static struct timeval zero_tv; static fd_set global_readfds; static fd_set global_writefds; @@ -779,7 +778,6 @@ examine_select(fd_set * readfds, fd_set * writefds) return 0; } - static void commIncomingStats(StoreEntry * sentry) { diff --git a/src/comm_poll.h b/src/comm_poll.h index 7b6a7b248f..16c4eb1274 100644 --- a/src/comm_poll.h +++ b/src/comm_poll.h @@ -34,5 +34,4 @@ #ifndef SQUID_COMM_POLL_H #define SQUID_COMM_POLL_H - #endif /* SQUID_COMM_POLL_H */ diff --git a/src/debug.cc b/src/debug.cc index 2f0186cd74..02cb78215f 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -660,7 +660,6 @@ static const char *Ctx_Descrs[CTX_MAX_LEVEL + 1]; /* "safe" get secription */ static const char *ctx_get_descr(Ctx ctx); - Ctx ctx_enter(const char *descr) { diff --git a/src/delay_pools.cc b/src/delay_pools.cc index 08169d24ac..1f05e4dd49 100644 --- a/src/delay_pools.cc +++ b/src/delay_pools.cc @@ -555,7 +555,6 @@ DelayPools::Init() RegisterWithCacheManager(); } - void DelayPools::InitDelayData() { @@ -893,7 +892,6 @@ ClassCNetPool::makeKey(Ip::Address &src_addr) const return ( (ntohl(net.s_addr) >> 8) & 0xff); } - ClassCHostPool::ClassCHostPool() { DelayPools::registerForUpdates (this); diff --git a/src/disk.cc b/src/disk.cc index 83644791f1..90f7df2cac 100644 --- a/src/disk.cc +++ b/src/disk.cc @@ -100,7 +100,6 @@ file_open(const char *path, int mode) return fd; } - /* close a disk file. */ void file_close(int fd) @@ -309,7 +308,6 @@ diskHandleWrite(int fd, void *notused) q << "," << (int) q->buf_offset << ", " << q->len << ", " << len << " FD " << fd << ")"); - assert(q->buf_offset <= q->len); if (q->buf_offset == q->len) { @@ -361,7 +359,6 @@ diskHandleWrite(int fd, void *notused) PROF_stop(diskHandleWrite); } - /* write block to a file */ /* write back queue. Only one writer at a time. */ /* call a handle when writing is complete. */ @@ -487,7 +484,6 @@ diskHandleRead(int fd, void *data) PROF_stop(diskHandleRead); } - /* start read operation */ /* buffer must be allocated from the caller. * It must have at least req_len space in there. diff --git a/src/dlink.cc b/src/dlink.cc index 4ec5c29966..c2712bbc42 100644 --- a/src/dlink.cc +++ b/src/dlink.cc @@ -7,7 +7,6 @@ /* dlink are Mem-pooled */ #include "MemPool.h" - dlink_list ClientActiveRequests; MemAllocator *dlink_node_pool = NULL; diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 5d671890ef..c19826375a 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -335,7 +335,6 @@ idnsAddPathComponent(const char *buf) ++npc; } - static void idnsFreeNameservers(void) { @@ -350,8 +349,6 @@ idnsFreeSearchpath(void) npc = npc_alloc = 0; } - - static void idnsParseNameservers(void) { diff --git a/src/dnsserver.cc b/src/dnsserver.cc index 08fba75e66..17630da24f 100644 --- a/src/dnsserver.cc +++ b/src/dnsserver.cc @@ -445,7 +445,6 @@ squid_res_setservers(int reset) #endif /* HAVE_RES_INIT */ } - /** * \ingroup dnsserver * diff --git a/src/enums.h b/src/enums.h index fc6639641f..bddfda4076 100644 --- a/src/enums.h +++ b/src/enums.h @@ -112,7 +112,6 @@ typedef enum { SC_ENUM_END } http_hdr_sc_type; - typedef enum _mem_status_t { NOT_IN_MEMORY, IN_MEMORY @@ -249,7 +248,6 @@ typedef enum { psError } HttpMsgParseState; - enum { PCTILE_HTTP, PCTILE_ICP_QUERY, @@ -304,7 +302,6 @@ enum { ROR_REPLY }; - /* CygWin & Windows NT Port */ #if _SQUID_WINDOWS_ /* diff --git a/src/errorpage.cc b/src/errorpage.cc index e37e51063f..3b618899de 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -66,7 +66,6 @@ * Config.errorDirectory) */ - #if !defined(DEFAULT_SQUID_ERROR_DIR) /** Where to look for errors if config path fails. \note Please use ./configure --datadir=/path instead of patching diff --git a/src/esi/ElementList.h b/src/esi/ElementList.h index d73a1fb79f..75ca7eda71 100644 --- a/src/esi/ElementList.h +++ b/src/esi/ElementList.h @@ -62,5 +62,4 @@ private: ElementList &operator=(ElementList const&); }; - #endif /* SQUID_ELEMENTLIST_H */ diff --git a/src/esi/Esi.cc b/src/esi/Esi.cc index d00c8e165e..9387561fce 100644 --- a/src/esi/Esi.cc +++ b/src/esi/Esi.cc @@ -101,7 +101,6 @@ bool operator == (ESIElement const *lhs, ESIElement::Pointer const &rhs) typedef ESIContext::esiKick_t esiKick_t; - /* some core operators */ /* esiComment */ @@ -146,7 +145,6 @@ CBDATA_TYPE (esiRemove); static FREE esiRemoveFree; static ESIElement * esiRemoveNew(void); - /* esiTry */ struct esiTry : public ESIElement { @@ -270,7 +268,6 @@ bool ESIContext::reading() const return reading_; } - ESIStreamContext::ESIStreamContext() : finished(false), include (NULL), localbuffer (new ESISegment), buffer (NULL) {} @@ -278,7 +275,6 @@ ESIStreamContext::ESIStreamContext() : finished(false), include (NULL), localbuf /* ESIContext */ static ESIContext *ESIContextNew(HttpReply *, clientStreamNode *, ClientHttpRequest *); - void * ESIContext::operator new(size_t byteCount) { @@ -486,7 +482,6 @@ esiStreamRead (clientStreamNode *thisNode, ClientHttpRequest *http) return; } - if (context->flags.oktosend && context->flags.finished) { StoreIOBuffer tempBuffer; assert (!context->outbound.getRaw()); @@ -680,7 +675,6 @@ ESIContext::send () if (len == 0) len = 1; /* tell the caller we sent something (because we sent headers */ - cbdataReferenceDone (templock); debugs (86,5,"ESIContext::send: this=" << this << " sent " << len); @@ -1455,7 +1449,6 @@ ESIContext::freeResources () extern ErrorState *clientBuildError (err_type, http_status, char const *, Ip::Address &, HttpRequest *); - /* This can ONLY be used before we have sent *any* data to the client */ void ESIContext::fail () @@ -2217,7 +2210,6 @@ esiChoose::provideData (ESISegment::Pointer data, ESIElement*source) parent->provideData (data, this); } - esiChoose::esiChoose(esiChoose const &old) : chosenelement(-1), otherwise (NULL), parent (NULL) { for (size_t counter = 0; counter < old.elements.size(); ++counter) { diff --git a/src/esi/Expression.cc b/src/esi/Expression.cc index 5d3968a1be..60162975a6 100644 --- a/src/esi/Expression.cc +++ b/src/esi/Expression.cc @@ -274,7 +274,6 @@ evalexpr(stackmember * stack, int *depth, int whereAmI, stackmember * candidate) return 1; } - int evalor(stackmember * stack, int *depth, int whereAmI, stackmember * candidate) { @@ -423,7 +422,6 @@ evallesseq(stackmember * stack, int *depth, int whereAmI, stackmember * candidat /* debugs(86, DBG_IMPORTANT, "?= " << srv.value.integral << " "); */ return 0; - } int @@ -472,7 +470,6 @@ evallessthan(stackmember * stack, int *depth, int whereAmI, stackmember * candid /* debugs(86, DBG_IMPORTANT, "?= " << srv.value.integral << " "); */ return 0; - } int @@ -521,7 +518,6 @@ evalmoreeq(stackmember * stack, int *depth, int whereAmI, stackmember * candidat /* debugs(86, DBG_IMPORTANT, "?= " << srv.value.integral << " "); */ return 0; - } int diff --git a/src/esi/Include.cc b/src/esi/Include.cc index 523b5420bd..5a61b1259d 100644 --- a/src/esi/Include.cc +++ b/src/esi/Include.cc @@ -161,7 +161,6 @@ esiBufferRecipient (clientStreamNode *node, ClientHttpRequest *http, HttpReply * return; } - /* after the write to the user occurs, (ie here, or in a callback) * we call */ if (clientHttpRequestStatus(-1, http)) { @@ -261,8 +260,6 @@ ESIStreamContextNew (ESIIncludePtr include) return rv; } - - /* ESIInclude */ ESIInclude::~ESIInclude() { @@ -322,7 +319,6 @@ ESIInclude::prepareRequestHeaders(HttpHeader &tempheaders, ESIVarState *vars) tempheaders.removeHopByHopEntries(); } - void ESIInclude::Start (ESIStreamContext::Pointer stream, char const *url, ESIVarState *vars) { diff --git a/src/esi/Parser.h b/src/esi/Parser.h index 4bf6c28609..c717700268 100644 --- a/src/esi/Parser.h +++ b/src/esi/Parser.h @@ -42,7 +42,6 @@ public: virtual ~ESIParserClient() {}; }; - /* for RefCountable */ #include "RefCount.h" diff --git a/src/esi/Segment.h b/src/esi/Segment.h index ef1648db09..7ec2262cd2 100644 --- a/src/esi/Segment.h +++ b/src/esi/Segment.h @@ -60,7 +60,6 @@ public: void adsorbList (ESISegment::Pointer from); size_t space() const; - char buf[HTTP_REQBUF_SZ]; size_t len; /* how much data has been pushed into this */ Pointer next; diff --git a/src/esi/Sequence.cc b/src/esi/Sequence.cc index 707d4f7701..211a9a4711 100644 --- a/src/esi/Sequence.cc +++ b/src/esi/Sequence.cc @@ -120,7 +120,6 @@ esiSequence::finish() parent = NULL; } - void esiSequence::provideData (ESISegment::Pointer data, ESIElement *source) { @@ -130,7 +129,6 @@ esiSequence::provideData (ESISegment::Pointer data, ESIElement *source) debugs(86, 5, "esiSequence::provideData: " << this << " data provided during processing"); debugs(86, 5, "esiSequence::provideData " << this << " " << data.getRaw() << " " << source); - /* when data is provided, the element *must* be completed */ /* XXX: when the callback model is complete, * we can introduce 'finished'. And then this rule can be diff --git a/src/esi/VarState.cc b/src/esi/VarState.cc index 4b29ef5321..c268b14fce 100644 --- a/src/esi/VarState.cc +++ b/src/esi/VarState.cc @@ -54,7 +54,6 @@ char const * esiBrowsers[]= {"MSIE", "OTHER" }; - void ESIVarState::Variable::eval (ESIVarState &state, char const *subref, char const *found_default) const { @@ -857,7 +856,6 @@ ESIVariableProcessor::~ESIVariableProcessor() delete currentFunction; } - /* XXX FIXME: this should be comma delimited, no? */ void ESIVarState::buildVary (HttpReply *rep) diff --git a/src/esi/VarState.h b/src/esi/VarState.h index ec66d45342..128c023efc 100644 --- a/src/esi/VarState.h +++ b/src/esi/VarState.h @@ -192,6 +192,4 @@ private: char *browserversion; }; - - #endif /* SQUID_ESIVARSTATE_H */ diff --git a/src/event.cc b/src/event.cc index d03050a2ac..a5764cbcde 100644 --- a/src/event.cc +++ b/src/event.cc @@ -43,7 +43,6 @@ /* The list of event processes */ - static OBJH eventDump; static const char *last_event_ran = NULL; @@ -111,7 +110,6 @@ EventDialer::print(std::ostream &os) const os << ')'; } - ev_entry::ev_entry(char const * aName, EVH * aFunction, void * aArgument, double evWhen, int aWeight, bool haveArgument) : name(aName), func(aFunction), arg(haveArgument ? cbdataReference(aArgument) : aArgument), when(evWhen), weight(aWeight), diff --git a/src/external_acl.cc b/src/external_acl.cc index 6eef5a2216..85019696c4 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -666,7 +666,6 @@ external_acl::trimCache() external_acl_cache_delete(this, static_cast(lru_list.tail->data)); } - /****************************************************************** * external acl type */ diff --git a/src/fd.cc b/src/fd.cc index 29a9164ab4..f1a07db90f 100644 --- a/src/fd.cc +++ b/src/fd.cc @@ -41,7 +41,6 @@ #include "profiler/Profiler.h" #include "SquidTime.h" - // Solaris and possibly others lack MSG_NOSIGNAL optimization // TODO: move this into compat/? Use a dedicated compat file to avoid dragging // sys/types.h and sys/socket.h into the rest of Squid?? diff --git a/src/format/Format.cc b/src/format/Format.cc index efb187397b..4e47cc353e 100644 --- a/src/format/Format.cc +++ b/src/format/Format.cc @@ -18,7 +18,6 @@ #include "ssl/ErrorDetail.h" #endif - /// Convert a string to NULL pointer if it is "" #define strOrNull(s) ((s)==NULL||(s)[0]=='\0'?NULL:(s)) @@ -441,7 +440,6 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS doint = 1; break; - case LFT_TIME_LOCALTIME: case LFT_TIME_GMT: { diff --git a/src/forward.cc b/src/forward.cc index fd264285ce..c0ec60f452 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -30,7 +30,6 @@ * */ - #include "squid.h" #include "AccessLogEntry.h" #include "acl/FilledChecklist.h" @@ -457,7 +456,6 @@ FwdState::complete() } } - /**** CALLBACK WRAPPERS ************************************************************/ static void @@ -1273,7 +1271,6 @@ fwdStats(StoreEntry * s) } } - /**** STATIC MEMBER FUNCTIONS *************************************************/ bool diff --git a/src/forward.h b/src/forward.h index 32bd039d7f..1f8e3e09ae 100644 --- a/src/forward.h +++ b/src/forward.h @@ -15,7 +15,6 @@ typedef RefCount AccessLogEntryPointer; class ErrorState; class HttpRequest; - /** * Returns the TOS value that we should be setting on the connection * to the server, based on the ACL. @@ -28,7 +27,6 @@ tos_t GetTosToServer(HttpRequest * request); */ nfmark_t GetNfmarkToServer(HttpRequest * request); - class FwdState : public RefCountable { public: diff --git a/src/fqdncache.cc b/src/fqdncache.cc index 42e80aca19..771160e7cc 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -165,7 +165,6 @@ fqdncache_entry::age() const return request_time.tv_sec ? tvSubMsec(request_time, current_time) : -1; } - /** \ingroup FQDNCacheInternal * Removes the given fqdncache entry @@ -488,7 +487,6 @@ fqdncacheParse(fqdncache_entry *f, const rfc1035_rr * answers, int nr, const cha #endif - /** \ingroup FQDNCacheAPI * @@ -686,7 +684,6 @@ fqdncache_gethostbyaddr(const Ip::Address &addr, int flags) return NULL; } - /** \ingroup FQDNCacheInternal * @@ -873,7 +870,6 @@ fqdncacheAddEntryFromHosts(char *addr, wordlist * hostnames) fqdncacheLockEntry(fce); } - #if SQUID_SNMP /** * \ingroup FQDNCacheAPI diff --git a/src/fs/Module.cc b/src/fs/Module.cc index 4668e6751f..86191b267a 100644 --- a/src/fs/Module.cc +++ b/src/fs/Module.cc @@ -17,7 +17,6 @@ static Fs::Ufs::StoreFSufs *UfsInstance; static Fs::Ufs::StoreFSufs *AufsInstance; #endif - #if HAVE_FS_DISKD static Fs::Ufs::StoreFSufs *DiskdInstance; #endif @@ -27,7 +26,6 @@ static Fs::Ufs::StoreFSufs *DiskdInstance; static Rock::StoreFileSystem *RockInstance = NULL; #endif - /* TODO: Modify coss code to: * (a) remove the StoreFScoss::GetInstance method, * (b) declare the StoreFScoss::stats as static and @@ -37,7 +35,6 @@ static Rock::StoreFileSystem *RockInstance = NULL; StoreFScoss &CossInstance = StoreFScoss::GetInstance(); #endif - void Fs::Init() { @@ -49,7 +46,6 @@ void Fs::Init() AufsInstance = new Fs::Ufs::StoreFSufs("DiskThreads", "aufs");; #endif - #if HAVE_FS_DISKD DiskdInstance = new Fs::Ufs::StoreFSufs("DiskDaemon", "diskd");; #endif @@ -60,7 +56,6 @@ void Fs::Init() } - void Fs::Clean() { #if HAVE_FS_UFS @@ -71,7 +66,6 @@ void Fs::Clean() delete AufsInstance; #endif - #if HAVE_FS_DISKD delete DiskdInstance; #endif diff --git a/src/fs/coss/CossSwapDir.h b/src/fs/coss/CossSwapDir.h index 642b27ce4c..7f399f62fe 100644 --- a/src/fs/coss/CossSwapDir.h +++ b/src/fs/coss/CossSwapDir.h @@ -12,7 +12,6 @@ class DiskFile; #include "SwapDir.h" #include "DiskIO/IORequestor.h" - #ifndef COSS_MEMBUF_SZ #define COSS_MEMBUF_SZ 1048576 #endif @@ -23,7 +22,6 @@ class DiskFile; #define COSS_ALLOC_ALLOCATE 1 #define COSS_ALLOC_REALLOC 2 - /// \ingroup COSS class CossSwapDir : public SwapDir, public IORequestor { @@ -113,7 +111,6 @@ extern void storeCossRemove(CossSwapDir *, StoreEntry *); /// \ingroup COSS extern void storeCossStartMembuf(CossSwapDir * SD); - #include "StoreSearch.h" /// \ingroup COSS diff --git a/src/fs/coss/StoreFScoss.h b/src/fs/coss/StoreFScoss.h index c1f20e1a0d..ad12d88170 100644 --- a/src/fs/coss/StoreFScoss.h +++ b/src/fs/coss/StoreFScoss.h @@ -66,7 +66,6 @@ public: open, create, close, unlink, read, write, stripe_write; }; - class CacheManager; #include "StoreFileSystem.h" diff --git a/src/fs/coss/store_coss.h b/src/fs/coss/store_coss.h index b37edaddec..3d0b1aa657 100644 --- a/src/fs/coss/store_coss.h +++ b/src/fs/coss/store_coss.h @@ -50,8 +50,6 @@ struct _cossindex { dlink_node node; }; - - /** \ingroup COSS * Per-storeiostate info @@ -91,7 +89,6 @@ MEMPROXY_CLASS_INLINE(CossState); /// \ingroup COSS typedef struct _cossindex CossIndexNode; - /** \ingroup COSS * Whether the coss system has been setup or not diff --git a/src/fs/coss/store_dir_coss.cc b/src/fs/coss/store_dir_coss.cc index 5a83b4449f..6d57ddad2d 100644 --- a/src/fs/coss/store_dir_coss.cc +++ b/src/fs/coss/store_dir_coss.cc @@ -218,7 +218,6 @@ CossSwapDir::writeCompleted(int errflag, size_t len, RefCount writ debugs(79, 3, "storeCossWriteMemBufDone: buf " << cossWrite->membuf << ", len " << len); - if (errflag) { ++ StoreFScoss::GetInstance().stats.stripe_write.fail; debugs(79, DBG_IMPORTANT, "storeCossWriteMemBufDone: got failure (" << errflag << ")"); @@ -227,7 +226,6 @@ CossSwapDir::writeCompleted(int errflag, size_t len, RefCount writ ++ StoreFScoss::GetInstance().stats.stripe_write.success; } - dlinkDelete(&cossWrite->membuf->node, &membufs); cbdataFree(cossWrite->membuf); -- StoreFScoss::GetInstance().stats.stripes; @@ -306,7 +304,6 @@ CossSwapDir::getOptionTree() const &CossSwapDir::optionBlockSizeParse, &CossSwapDir::optionBlockSizeDump)); - ConfigOption *ioOptions = NULL; if (io) @@ -1037,7 +1034,6 @@ CossSwapDir::parse(int anIndex, char *aPath) } } - void CossSwapDir::reconfigure() { diff --git a/src/fs/coss/store_io_coss.cc b/src/fs/coss/store_io_coss.cc index 1ad50d13f1..6a1bf7241c 100644 --- a/src/fs/coss/store_io_coss.cc +++ b/src/fs/coss/store_io_coss.cc @@ -50,7 +50,6 @@ CBDATA_TYPE(CossMemBuf); CossState::CossState(CossSwapDir *aCSD):SD (aCSD) {} - /* * This routine sucks. I want to rewrite it when possible, and I also think * that we should check after creatmembuf() to see if the object has a diff --git a/src/fs/rock/RockIoRequests.h b/src/fs/rock/RockIoRequests.h index 0fd0e8b7c8..15e57601d8 100644 --- a/src/fs/rock/RockIoRequests.h +++ b/src/fs/rock/RockIoRequests.h @@ -21,7 +21,6 @@ private: CBDATA_CLASS2(ReadRequest); }; - /// \ingroup Rock class WriteRequest: public ::WriteRequest { @@ -33,7 +32,6 @@ private: CBDATA_CLASS2(WriteRequest); }; - } // namespace Rock #endif /* SQUID_FS_ROCK_IO_REQUESTS_H */ diff --git a/src/fs/rock/RockIoState.cc b/src/fs/rock/RockIoState.cc index 1cabf79526..32a2f12248 100644 --- a/src/fs/rock/RockIoState.cc +++ b/src/fs/rock/RockIoState.cc @@ -194,7 +194,6 @@ private: Rock::IoState::Pointer sio; }; - void Rock::IoState::callBack(int errflag) { diff --git a/src/fs/rock/RockStoreFileSystem.cc b/src/fs/rock/RockStoreFileSystem.cc index 05960a0876..f27f66bdb1 100644 --- a/src/fs/rock/RockStoreFileSystem.cc +++ b/src/fs/rock/RockStoreFileSystem.cc @@ -8,7 +8,6 @@ #include "fs/rock/RockStoreFileSystem.h" #include "fs/rock/RockSwapDir.h" - Rock::StoreFileSystem::StoreFileSystem() { FsAdd(*this); diff --git a/src/fs/rock/RockSwapDir.cc b/src/fs/rock/RockSwapDir.cc index 667ba1724b..9e45a0b01e 100644 --- a/src/fs/rock/RockSwapDir.cc +++ b/src/fs/rock/RockSwapDir.cc @@ -464,7 +464,6 @@ Rock::SwapDir::addEntry(const int filen, const DbCellHeader &header, const Store return false; } - bool Rock::SwapDir::canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const { @@ -779,7 +778,6 @@ Rock::SwapDir::trackReferences(StoreEntry &e) repl->Add(repl, &e, &e.repl); } - void Rock::SwapDir::ignoreReferences(StoreEntry &e) { @@ -828,7 +826,6 @@ Rock::SwapDir::statfs(StoreEntry &e) const } - namespace Rock { RunnerRegistrationEntry(rrAfterConfig, SwapDirRr); diff --git a/src/fs/rock/RockSwapDir.h b/src/fs/rock/RockSwapDir.h index f427c57fff..793b5bea6b 100644 --- a/src/fs/rock/RockSwapDir.h +++ b/src/fs/rock/RockSwapDir.h @@ -112,7 +112,6 @@ private: Vector owners; }; - } // namespace Rock #endif /* SQUID_FS_ROCK_SWAP_DIR_H */ diff --git a/src/fs/ufs/RebuildState.h b/src/fs/ufs/RebuildState.h index aea10bab61..9a7d7c5760 100644 --- a/src/fs/ufs/RebuildState.h +++ b/src/fs/ufs/RebuildState.h @@ -95,7 +95,6 @@ private: void *cbdata; }; - } /* namespace Ufs */ } /* namespace Fs */ diff --git a/src/fs/ufs/UFSStoreState.cc b/src/fs/ufs/UFSStoreState.cc index c0e0b77e62..8f15b363de 100644 --- a/src/fs/ufs/UFSStoreState.cc +++ b/src/fs/ufs/UFSStoreState.cc @@ -45,7 +45,6 @@ #include "UFSStrategy.h" #include "UFSStoreState.h" - CBDATA_NAMESPACED_CLASS_INIT(Fs::Ufs,UFSStoreState); void * @@ -185,7 +184,6 @@ Fs::Ufs::UFSStoreState::read_(char *buf, size_t size, off_t aOffset, STRCB * aCa theFile->read(new ReadRequest(buf,aOffset,size)); } - /* * DPW 2006-05-24 * This, the public write interface, places the write request at the end @@ -211,7 +209,6 @@ Fs::Ufs::UFSStoreState::write(char const *buf, size_t size, off_t aOffset, FREE drainWriteQueue(); } - /* * DPW 2006-05-24 * This, the private write method, calls the lower level write for the diff --git a/src/fs/ufs/UFSSwapDir.cc b/src/fs/ufs/UFSSwapDir.cc index a1c2fff98d..14f95378e1 100644 --- a/src/fs/ufs/UFSSwapDir.cc +++ b/src/fs/ufs/UFSSwapDir.cc @@ -950,7 +950,6 @@ Fs::Ufs::UFSSwapDir::writeCleanStart() #endif - cleanLog = state; return 0; } @@ -1175,7 +1174,6 @@ Fs::Ufs::UFSSwapDir::replacementAdd(StoreEntry * e) repl->Add(repl, e, &e->repl); } - void Fs::Ufs::UFSSwapDir::replacementRemove(StoreEntry * e) { diff --git a/src/ftp.cc b/src/ftp.cc index 7698a9f60f..46d1aa67e7 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1951,7 +1951,6 @@ FtpStateData::loginFailed() if (reply) err->ftp.reply = xstrdup(reply); - HttpReply *newrep = err->BuildHttpReply(); delete err; @@ -3296,7 +3295,6 @@ FtpStateData::completedListing() entry->unlock(); } - /// \ingroup ServerProtocolFTPInternal static void ftpReadTransferDone(FtpStateData * ftpState) diff --git a/src/globals.h b/src/globals.h index 44ad3edfdf..6720f7a668 100644 --- a/src/globals.h +++ b/src/globals.h @@ -44,7 +44,6 @@ /* for iostats */ #include "structs.h" - extern char *ConfigFile; /* NULL */ extern char *IcpOpcodeStr[]; extern char tmp_error_buf[ERROR_BUF_SZ]; diff --git a/src/gopher.cc b/src/gopher.cc index 648268b868..1888949064 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -637,7 +637,6 @@ gopherToHTML(GopherStateData * gopherState, char *inbuf, int len) break; } /* HTML_DIR, HTML_INDEX_RESULT */ - case gopher_ds::HTML_CSO_RESULT: { if (line[0] == '-') { int code, recno; @@ -697,7 +696,6 @@ gopherToHTML(GopherStateData * gopherState, char *inbuf, int len) break; } - } } diff --git a/src/helper.cc b/src/helper.cc index 0754333106..27b6413250 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -48,7 +48,6 @@ #define HELPER_MAX_ARGS 64 - /** Initial Squid input buffer size. Helper responses may exceed this, and * Squid will grow the input buffer as needed, up to ReadBufMaxSize. */ @@ -80,7 +79,6 @@ static void helperStatefulRequestFree(helper_stateful_request * r); static void StatefulEnqueue(statefulhelper * hlp, helper_stateful_request * r); static bool helperStartStats(StoreEntry *sentry, void *hlp, const char *label); - CBDATA_CLASS_INIT(helper); CBDATA_TYPE(helper_server); CBDATA_CLASS_INIT(statefulhelper); @@ -386,7 +384,6 @@ helperStatefulOpenServers(statefulhelper * hlp) helperStatefulKickQueue(hlp); } - void helperSubmit(helper * hlp, const char *buf, HLPCB * callback, void *data) { @@ -969,7 +966,6 @@ helperStatefulHandleRead(const Comm::ConnectionPointer &conn, char *buf, size_t debugs(84, 5, "helperStatefulHandleRead: " << len << " bytes from " << hlp->id_name << " #" << srv->index + 1); - if (flag != COMM_OK || len == 0) { srv->closePipesSafely(); return; @@ -1228,7 +1224,6 @@ StatefulGetFirstAvailable(statefulhelper * hlp) return NULL; } - static void helperDispatchWriteDone(const Comm::ConnectionPointer &conn, char *buf, size_t len, comm_err_t flag, int xerrno, void *data) { @@ -1311,7 +1306,6 @@ helperStatefulDispatchWriteDone(const Comm::ConnectionPointer &conn, char *buf, /* nothing! */ } - static void helperStatefulDispatch(helper_stateful_server * srv, helper_stateful_request * r) { @@ -1357,7 +1351,6 @@ helperStatefulDispatch(helper_stateful_server * srv, helper_stateful_request * r ++ hlp->stats.requests; } - static void helperKickQueue(helper * hlp) { diff --git a/src/helper.h b/src/helper.h index d1a5fc2716..5da5c3b752 100644 --- a/src/helper.h +++ b/src/helper.h @@ -213,5 +213,4 @@ SQUIDCEXTERN void helperStatefulShutdown(statefulhelper * hlp); SQUIDCEXTERN void helperStatefulReleaseServer(helper_stateful_server * srv); SQUIDCEXTERN void *helperStatefulServerGetData(helper_stateful_server * srv); - #endif /* SQUID_HELPER_H */ diff --git a/src/htcp.cc b/src/htcp.cc index 74c9639af0..8150bcbd45 100644 --- a/src/htcp.cc +++ b/src/htcp.cc @@ -248,7 +248,6 @@ static MemAllocator *htcpDetailPool = NULL; static int old_squid_format = 0; - static ssize_t htcpBuildPacket(char *buf, size_t buflen, htcpStuff * stuff); static htcpSpecifier *htcpUnpackSpecifier(char *buf, int sz); static htcpDetail *htcpUnpackDetail(char *buf, int sz); diff --git a/src/http.cc b/src/http.cc index 412a8a9727..73c4c08d22 100644 --- a/src/http.cc +++ b/src/http.cc @@ -784,7 +784,6 @@ HttpStateData::proceedAfter1xx() CallJobHere(11, 3, this, HttpStateData, HttpStateData::processReply); } - /** * returns true if the peer can support connection pinning */ @@ -1381,7 +1380,6 @@ HttpStateData::processReplyBody() if (request->flags.spoof_client_ip) client_addr = request->client_addr; - if (request->flags.pinned) { ispinned = true; } else if (request->flags.connection_auth && request->flags.auth_sent) { @@ -1829,7 +1827,6 @@ copyOneHeaderFromClientsideRequestToUpstreamRequest(const HttpHeaderEntry *e, co case HDR_TRANSFER_ENCODING: /** \par Transfer-Encoding: */ break; - /** \par OTHER headers I haven't bothered to track down yet. */ case HDR_AUTHORIZATION: diff --git a/src/icmp/Icmp.h b/src/icmp/Icmp.h index 90c66885d1..c95eb24c66 100644 --- a/src/icmp/Icmp.h +++ b/src/icmp/Icmp.h @@ -70,7 +70,6 @@ SQUIDCEXTERN int icmp_pkts_sent; #endif /* USE_ICMP */ - /** * Implements the squid interface to access ICMP operations * diff --git a/src/icmp/Icmp4.h b/src/icmp/Icmp4.h index 60ea6eb1a5..a8642bb812 100644 --- a/src/icmp/Icmp4.h +++ b/src/icmp/Icmp4.h @@ -77,7 +77,6 @@ #define ip_dst daddr #endif - /* Native Windows port doesn't have netinet support, so we emulate it. At this time, Cygwin lacks icmp support in its include files, so we need to use the native Windows port definitions. diff --git a/src/icmp/Icmp6.cc b/src/icmp/Icmp6.cc index 80324072d8..f80cc70dd6 100644 --- a/src/icmp/Icmp6.cc +++ b/src/icmp/Icmp6.cc @@ -164,7 +164,6 @@ Icmp6::SendEcho(Ip::Address &to, int opcode, const char *payload, int len) icmp6_pktsize = sizeof(struct icmp6_hdr); - // Fill Icmp6 ECHO data content echo = (icmpEchoData *) (pkt + sizeof(icmp6_hdr)); echo->opcode = (unsigned char) opcode; @@ -268,7 +267,6 @@ Icmp6::Recv(void) #define ip6_hlim // MAX hops (always 64, but no guarantee) #define ip6_hops // HOPS!!! (can it be true??) - ip = (struct ip6_hdr *) pkt; pkt += sizeof(ip6_hdr); diff --git a/src/icmp/IcmpSquid.cc b/src/icmp/IcmpSquid.cc index 7a8b43dca4..82a1599c2b 100644 --- a/src/icmp/IcmpSquid.cc +++ b/src/icmp/IcmpSquid.cc @@ -61,7 +61,6 @@ static pid_t pid; #endif /* USE_ICMP */ - IcmpSquid::IcmpSquid() : Icmp() { ; // nothing new. @@ -72,7 +71,6 @@ IcmpSquid::~IcmpSquid() Close(); } - #if USE_ICMP void diff --git a/src/icmp/net_db.cc b/src/icmp/net_db.cc index 80b94799fd..cffe9b7c1c 100644 --- a/src/icmp/net_db.cc +++ b/src/icmp/net_db.cc @@ -676,7 +676,6 @@ netdbFreeNameEntry(void *data) memFree(x, MEM_NET_DB_NAME); } - static void netdbExchangeHandleReply(void *data, StoreIOBuffer receivedData) { @@ -893,7 +892,6 @@ netdbRegisterWithCacheManager(void) #endif /* USE_ICMP */ - /* PUBLIC FUNCTIONS */ void @@ -983,7 +981,6 @@ netdbFreeMemory(void) #endif } - #if 0 // AYJ: Looks to be unused code. int netdbHops(Ip::Address &addr) @@ -1211,7 +1208,6 @@ netdbDeleteAddrNetwork(Ip::Address &addr) #endif } - void netdbBinaryExchange(StoreEntry * s) { diff --git a/src/icmp/net_db.h b/src/icmp/net_db.h index 616cdbcf55..8282ad4d4f 100644 --- a/src/icmp/net_db.h +++ b/src/icmp/net_db.h @@ -12,7 +12,6 @@ class HttpRequest; /* for struct peer */ #include "structs.h" - SQUIDCEXTERN void netdbInit(void); SQUIDCEXTERN void netdbHandlePingReply(const Ip::Address &from, int hops, int rtt); diff --git a/src/icp_v2.cc b/src/icp_v2.cc index ee6ef69490..075377a3df 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -133,7 +133,6 @@ ICPState::~ICPState() HTTPMSGUNLOCK(request); } - /* End ICPState */ /* ICP2State */ diff --git a/src/icp_v3.cc b/src/icp_v3.cc index 96a83045c5..350b1233a4 100644 --- a/src/icp_v3.cc +++ b/src/icp_v3.cc @@ -105,7 +105,6 @@ ICP3State::created(StoreEntry *newEntry) delete this; } - /// \ingroup ServerProtocolICPInternal3 /* Currently Harvest cached-2.x uses ICP_VERSION_3 */ void diff --git a/src/ident/AclIdent.cc b/src/ident/AclIdent.cc index aac64644ce..34c00fdc30 100644 --- a/src/ident/AclIdent.cc +++ b/src/ident/AclIdent.cc @@ -119,7 +119,6 @@ ACLIdent::clone() const return new ACLIdent(*this); } - IdentLookup IdentLookup::instance_; IdentLookup * diff --git a/src/ident/AclIdent.h b/src/ident/AclIdent.h index 9d6674e12b..f3cda5b90a 100644 --- a/src/ident/AclIdent.h +++ b/src/ident/AclIdent.h @@ -52,7 +52,6 @@ private: static void LookupDone(const char *ident, void *data); }; - #include "acl/Acl.h" #include "acl/Data.h" diff --git a/src/ip/Address.h b/src/ip/Address.h index 9591aca462..ae0fc37369 100644 --- a/src/ip/Address.h +++ b/src/ip/Address.h @@ -234,7 +234,6 @@ public: */ bool ApplyMask(const unsigned int cidr, int mtype); - /** Return the ASCII equivalent of the address * Semantically equivalent to the IPv4 inet_ntoa() * eg. 127.0.0.1 (IPv4) or ::1 (IPv6) @@ -382,7 +381,6 @@ private: static const struct in6_addr v6_noaddr; }; - inline std::ostream & operator << (std::ostream &os, const Address &ipa) { diff --git a/src/ip/Intercept.h b/src/ip/Intercept.h index 8744d83376..6f8444f11c 100644 --- a/src/ip/Intercept.h +++ b/src/ip/Intercept.h @@ -85,7 +85,6 @@ public: */ inline void StopInterception(const char *str); - private: /** @@ -133,7 +132,6 @@ private: */ bool PfInterception(const Comm::ConnectionPointer &newConn, int silent); - int transparentActive_; int interceptActive_; time_t lastReported_; /**< Time of last error report. Throttles NAT error display to 1 per minute */ diff --git a/src/ip/stubQosConfig.cc b/src/ip/stubQosConfig.cc index 2bb4dbdf68..129e883f24 100644 --- a/src/ip/stubQosConfig.cc +++ b/src/ip/stubQosConfig.cc @@ -3,7 +3,6 @@ #include "ip/QosConfig.h" #include "Store.h" - void Ip::Qos::getTosFromServer(fde *clientFde, const int server_fd) { diff --git a/src/ip/testAddress.cc b/src/ip/testAddress.cc index c69ab8f7cb..2a87352eb4 100644 --- a/src/ip/testAddress.cc +++ b/src/ip/testAddress.cc @@ -24,7 +24,6 @@ #include #endif - CPPUNIT_TEST_SUITE_REGISTRATION( testIpAddress ); /* so that we don't break POD dependency just for the test */ @@ -154,7 +153,6 @@ testIpAddress::testSockAddr6Constructor() CPPUNIT_ASSERT( memcmp( &insock, &outsock, sizeof(struct sockaddr_in6)) == 0 ); } - void testIpAddress::testCopyConstructor() { @@ -174,7 +172,6 @@ testIpAddress::testCopyConstructor() Ip::Address inIPA(insock); Ip::Address outIPA(inIPA); - /* test stored values */ CPPUNIT_ASSERT( !outIPA.IsAnyAddr() ); CPPUNIT_ASSERT( !outIPA.IsNoAddr() ); @@ -734,7 +731,6 @@ testIpAddress::testBugNullingDisplay() Ip::Address anIPA = "192.168.100.12"; - /* test stored values */ CPPUNIT_ASSERT( !anIPA.IsAnyAddr() ); CPPUNIT_ASSERT( !anIPA.IsNoAddr() ); @@ -745,7 +741,6 @@ testIpAddress::testBugNullingDisplay() anIPA.GetInAddr(outval); CPPUNIT_ASSERT( memcmp( &expectval, &outval, sizeof(struct in_addr)) == 0 ); - /* POKE NtoA display function to see what it is doing */ anIPA.NtoA(ntoabuf,MAX_IPSTRLEN); CPPUNIT_ASSERT( !anIPA.IsAnyAddr() ); @@ -759,8 +754,6 @@ testIpAddress::testBugNullingDisplay() anIPA.GetInAddr(outval); CPPUNIT_ASSERT( memcmp( &expectval, &outval, sizeof(struct in_addr)) == 0 ); - - /* POKE ToHostname display function to see what it is doing */ anIPA.ToHostname(hostbuf,MAX_IPSTRLEN); CPPUNIT_ASSERT( !anIPA.IsAnyAddr() ); @@ -774,7 +767,6 @@ testIpAddress::testBugNullingDisplay() anIPA.GetInAddr(outval); CPPUNIT_ASSERT( memcmp( &expectval, &outval, sizeof(struct in_addr)) == 0 ); - /* POKE ToURL display function to see what it is doing */ anIPA.ToURL(urlbuf,MAX_IPSTRLEN); CPPUNIT_ASSERT( !anIPA.IsAnyAddr() ); diff --git a/src/ipc/Coordinator.cc b/src/ipc/Coordinator.cc index 78953b00e9..e54b028cbf 100644 --- a/src/ipc/Coordinator.cc +++ b/src/ipc/Coordinator.cc @@ -5,7 +5,6 @@ * */ - #include "squid.h" #include "base/Subscription.h" #include "base/TextException.h" @@ -30,7 +29,6 @@ CBDATA_NAMESPACED_CLASS_INIT(Ipc, Coordinator); Ipc::Coordinator* Ipc::Coordinator::TheInstance = NULL; - Ipc::Coordinator::Coordinator(): Port(coordinatorAddr) { diff --git a/src/ipc/Coordinator.h b/src/ipc/Coordinator.h index 757319edfa..59fc24a716 100644 --- a/src/ipc/Coordinator.h +++ b/src/ipc/Coordinator.h @@ -8,7 +8,6 @@ #ifndef SQUID_IPC_COORDINATOR_H #define SQUID_IPC_COORDINATOR_H - #include "Array.h" #include "ipc/Messages.h" #include "ipc/Port.h" @@ -80,7 +79,6 @@ private: CBDATA_CLASS2(Coordinator); }; - } // namespace Ipc #endif /* SQUID_IPC_COORDINATOR_H */ diff --git a/src/ipc/FdNotes.cc b/src/ipc/FdNotes.cc index 603adf1d22..1a752fcdbd 100644 --- a/src/ipc/FdNotes.cc +++ b/src/ipc/FdNotes.cc @@ -9,7 +9,6 @@ #include "Debug.h" #include "ipc/FdNotes.h" - const char * Ipc::FdNote(int fdNoteId) { diff --git a/src/ipc/FdNotes.h b/src/ipc/FdNotes.h index 20978ea2c8..7b2d1b00cc 100644 --- a/src/ipc/FdNotes.h +++ b/src/ipc/FdNotes.h @@ -25,5 +25,4 @@ extern const char *FdNote(int fdNodeId); ///< converts FdNoteId into a string } // namespace Ipc; - #endif /* SQUID_IPC_FD_NOTES_H */ diff --git a/src/ipc/Forwarder.cc b/src/ipc/Forwarder.cc index 0f652a6f1a..f78132614b 100644 --- a/src/ipc/Forwarder.cc +++ b/src/ipc/Forwarder.cc @@ -15,7 +15,6 @@ #include "ipc/Port.h" #include "ipc/TypedMsgHdr.h" - CBDATA_NAMESPACED_CLASS_INIT(Ipc, Forwarder); Ipc::Forwarder::RequestsMap Ipc::Forwarder::TheRequestsMap; diff --git a/src/ipc/Forwarder.h b/src/ipc/Forwarder.h index dfda91f6e7..46a24cb312 100644 --- a/src/ipc/Forwarder.h +++ b/src/ipc/Forwarder.h @@ -13,7 +13,6 @@ #include "ipc/Request.h" #include - namespace Ipc { diff --git a/src/ipc/Inquirer.cc b/src/ipc/Inquirer.cc index 5ff66a3803..f5bc52d7b0 100644 --- a/src/ipc/Inquirer.cc +++ b/src/ipc/Inquirer.cc @@ -15,7 +15,6 @@ #include "MemBuf.h" #include - CBDATA_NAMESPACED_CLASS_INIT(Ipc, Inquirer); Ipc::Inquirer::RequestsMap Ipc::Inquirer::TheRequestsMap; diff --git a/src/ipc/Inquirer.h b/src/ipc/Inquirer.h index 6341528938..19a00bc63c 100644 --- a/src/ipc/Inquirer.h +++ b/src/ipc/Inquirer.h @@ -16,7 +16,6 @@ #include "ipc/StrandCoords.h" #include - namespace Ipc { diff --git a/src/ipc/Kid.h b/src/ipc/Kid.h index a6d6e5f9f2..ef4097288e 100644 --- a/src/ipc/Kid.h +++ b/src/ipc/Kid.h @@ -8,7 +8,6 @@ #include "SquidString.h" - /// Squid child, including current forked process info and /// info persistent across restarts class Kid @@ -85,7 +84,6 @@ private: status_type status; ///< exit status of a stopped kid }; - // TODO: processes may not be kids; is there a better place to put this? /// process kinds @@ -99,5 +97,4 @@ typedef enum { /// ProcessKind for the current process extern int TheProcessKind; - #endif /* SQUID_IPC_KID_H */ diff --git a/src/ipc/Kids.h b/src/ipc/Kids.h index e5b8a90bd9..eb79c1f718 100644 --- a/src/ipc/Kids.h +++ b/src/ipc/Kids.h @@ -9,7 +9,6 @@ #include "Array.h" #include "ipc/Kid.h" - /// a collection of kids class Kids { @@ -57,5 +56,4 @@ extern Kids TheKids; ///< All kids being maintained typedef char KidName[64]; ///< Squid process name (e.g., "squid-coord") extern KidName TheKidName; ///< current Squid process name - #endif /* SQUID_IPC_KIDS_H */ diff --git a/src/ipc/Messages.h b/src/ipc/Messages.h index 12986ccd66..5590475cf0 100644 --- a/src/ipc/Messages.h +++ b/src/ipc/Messages.h @@ -27,5 +27,4 @@ typedef enum { mtNone = 0, mtRegistration, } // namespace Ipc; - #endif /* SQUID_IPC_MESSAGES_H */ diff --git a/src/ipc/Port.cc b/src/ipc/Port.cc index 29c3bc213b..905d10bd79 100644 --- a/src/ipc/Port.cc +++ b/src/ipc/Port.cc @@ -5,7 +5,6 @@ * */ - #include "squid.h" #include "comm.h" #include "CommCalls.h" @@ -15,7 +14,6 @@ const char Ipc::coordinatorAddr[] = DEFAULT_STATEDIR "/coordinator.ipc"; const char Ipc::strandAddrPfx[] = DEFAULT_STATEDIR "/kid"; - Ipc::Port::Port(const String& aListenAddr): UdsOp(aListenAddr) { diff --git a/src/ipc/Port.h b/src/ipc/Port.h index a2d69b52b5..f116392451 100644 --- a/src/ipc/Port.h +++ b/src/ipc/Port.h @@ -8,15 +8,12 @@ #ifndef SQUID_IPC_PORT_H #define SQUID_IPC_PORT_H - #include "SquidString.h" #include "ipc/UdsOp.h" - namespace Ipc { - /// Waits for and receives incoming IPC messages; kids handle the messages class Port: public UdsOp { @@ -42,11 +39,9 @@ private: TypedMsgHdr buf; ///< msghdr struct filled by Comm }; - extern const char coordinatorAddr[]; ///< where coordinator listens extern const char strandAddrPfx[]; ///< strand's listening address prefix } // namespace Ipc - #endif /* SQUID_IPC_PORT_H */ diff --git a/src/ipc/Queue.cc b/src/ipc/Queue.cc index 9ce1b94e83..98dd765f28 100644 --- a/src/ipc/Queue.cc +++ b/src/ipc/Queue.cc @@ -35,7 +35,6 @@ ReadersId(String id) return id; } - /* QueueReader */ InstanceIdDefinitions(Ipc::QueueReader, "ipcQR"); @@ -71,7 +70,6 @@ Ipc::QueueReaders::SharedMemorySize(const int capacity) return sizeof(QueueReaders) + sizeof(QueueReader) * capacity; } - // OneToOneUniQueue Ipc::OneToOneUniQueue::OneToOneUniQueue(const unsigned int aMaxItemSize, const int aCapacity): @@ -97,7 +95,6 @@ Ipc::OneToOneUniQueue::Items2Bytes(const unsigned int maxItemSize, const int siz return sizeof(OneToOneUniQueue) + maxItemSize * size; } - /* OneToOneUniQueues */ Ipc::OneToOneUniQueues::OneToOneUniQueues(const int aCapacity, const unsigned int maxItemSize, const int queueCapacity): theCapacity(aCapacity) @@ -131,7 +128,6 @@ Ipc::OneToOneUniQueues::operator [](const int index) const return *reinterpret_cast(queue); } - // FewToFewBiQueue Ipc::FewToFewBiQueue::Owner * diff --git a/src/ipc/Queue.h b/src/ipc/Queue.h index 45fb3af576..78a1679e19 100644 --- a/src/ipc/Queue.h +++ b/src/ipc/Queue.h @@ -254,7 +254,6 @@ private: int theLastPopProcessId; ///< the ID of the last process we tried to pop() from }; - // OneToOneUniQueue template @@ -321,7 +320,6 @@ OneToOneUniQueue::push(const Value &value, QueueReader *const reader) return wasEmpty && (!reader || reader->raiseSignal()); } - // OneToOneUniQueues inline OneToOneUniQueue & @@ -338,7 +336,6 @@ OneToOneUniQueues::front() const return *reinterpret_cast(queue); } - // FewToFewBiQueue template diff --git a/src/ipc/ReadWriteLock.cc b/src/ipc/ReadWriteLock.cc index 981a85447d..010cb5cfa6 100644 --- a/src/ipc/ReadWriteLock.cc +++ b/src/ipc/ReadWriteLock.cc @@ -63,7 +63,6 @@ Ipc::ReadWriteLock::updateStats(ReadWriteLockStats &stats) const ++stats.count; } - /* Ipc::ReadWriteLockStats */ Ipc::ReadWriteLockStats::ReadWriteLockStats() diff --git a/src/ipc/ReadWriteLock.h b/src/ipc/ReadWriteLock.h index 9bcad4042f..925e02ca0d 100644 --- a/src/ipc/ReadWriteLock.h +++ b/src/ipc/ReadWriteLock.h @@ -30,7 +30,6 @@ public: Atomic::Word writers; ///< number of writers trying to modify protected data }; - /// approximate stats of a set of ReadWriteLocks class ReadWriteLockStats { diff --git a/src/ipc/Request.h b/src/ipc/Request.h index f56aad3fbf..fcc7c044db 100644 --- a/src/ipc/Request.h +++ b/src/ipc/Request.h @@ -11,7 +11,6 @@ #include "ipc/forward.h" #include "RefCount.h" - namespace Ipc { @@ -37,7 +36,6 @@ public: unsigned int requestId; ///< unique for sender; matches request w/ response }; - } // namespace Ipc #endif /* SQUID_IPC_REQUEST_H */ diff --git a/src/ipc/Response.h b/src/ipc/Response.h index 1ae2f8a7bf..2411c3b396 100644 --- a/src/ipc/Response.h +++ b/src/ipc/Response.h @@ -11,7 +11,6 @@ #include "ipc/forward.h" #include "RefCount.h" - namespace Ipc { @@ -43,7 +42,6 @@ std::ostream& operator << (std::ostream &os, const Response& response) return os; } - } // namespace Ipc #endif /* SQUID_IPC_RESPONSE_H */ diff --git a/src/ipc/SharedListen.cc b/src/ipc/SharedListen.cc index a90e02f143..80fc691e80 100644 --- a/src/ipc/SharedListen.cc +++ b/src/ipc/SharedListen.cc @@ -65,8 +65,6 @@ Ipc::OpenListenerParams::operator <(const OpenListenerParams &p) const return addr.compareWhole(p.addr) < 0; } - - Ipc::SharedListenRequest::SharedListenRequest(): requestorId(-1), mapId(-1) { // caller will then set public data members @@ -84,7 +82,6 @@ void Ipc::SharedListenRequest::pack(TypedMsgHdr &hdrMsg) const hdrMsg.putPod(*this); } - Ipc::SharedListenResponse::SharedListenResponse(int aFd, int anErrNo, int aMapId): fd(aFd), errNo(anErrNo), mapId(aMapId) { @@ -106,7 +103,6 @@ void Ipc::SharedListenResponse::pack(TypedMsgHdr &hdrMsg) const hdrMsg.putFd(fd); } - void Ipc::JoinSharedListen(const OpenListenerParams ¶ms, AsyncCall::Pointer &callback) { diff --git a/src/ipc/SharedListen.h b/src/ipc/SharedListen.h index 0b600338a0..83f0033097 100644 --- a/src/ipc/SharedListen.h +++ b/src/ipc/SharedListen.h @@ -78,5 +78,4 @@ extern void SharedListenJoined(const SharedListenResponse &response); } // namespace Ipc; - #endif /* SQUID_IPC_SHARED_LISTEN_H */ diff --git a/src/ipc/StartListening.h b/src/ipc/StartListening.h index df4f12d840..1f3c052c17 100644 --- a/src/ipc/StartListening.h +++ b/src/ipc/StartListening.h @@ -44,5 +44,4 @@ extern void StartListening(int sock_type, int proto, const Comm::ConnectionPoint } // namespace Ipc; - #endif /* SQUID_IPC_START_LISTENING_H */ diff --git a/src/ipc/StoreMap.cc b/src/ipc/StoreMap.cc index a0b999af49..846d96c5dc 100644 --- a/src/ipc/StoreMap.cc +++ b/src/ipc/StoreMap.cc @@ -267,7 +267,6 @@ Ipc::StoreMap::freeLocked(Slot &s, bool keepLocked) " in map [" << path << ']'); } - /* Ipc::StoreMapSlot */ Ipc::StoreMapSlot::StoreMapSlot(): state(Empty) diff --git a/src/ipc/StoreMap.h b/src/ipc/StoreMap.h index 7006b39cb1..42afbf46da 100644 --- a/src/ipc/StoreMap.h +++ b/src/ipc/StoreMap.h @@ -197,7 +197,6 @@ StoreMapWithExtras::extras(const sfileno fileno) const return sharedExtras[fileno]; } - } // namespace Ipc // We do not reuse FileMap because we cannot control its size, diff --git a/src/ipc/Strand.cc b/src/ipc/Strand.cc index f7eba0150e..3bd7b2c239 100644 --- a/src/ipc/Strand.cc +++ b/src/ipc/Strand.cc @@ -32,7 +32,6 @@ CBDATA_NAMESPACED_CLASS_INIT(Ipc, Strand); - Ipc::Strand::Strand(): Port(MakeAddr(strandAddrPfx, KidIdentifier)), isRegistered(false) diff --git a/src/ipc/Strand.h b/src/ipc/Strand.h index 30c7c5442c..171c60ca6f 100644 --- a/src/ipc/Strand.h +++ b/src/ipc/Strand.h @@ -52,8 +52,6 @@ private: CBDATA_CLASS2(Strand); }; - } - #endif /* SQUID_IPC_STRAND_H */ diff --git a/src/ipc/StrandCoord.cc b/src/ipc/StrandCoord.cc index 50c41de75d..cbd99592bb 100644 --- a/src/ipc/StrandCoord.cc +++ b/src/ipc/StrandCoord.cc @@ -5,14 +5,12 @@ * */ - #include "squid.h" #include "Debug.h" #include "ipc/Messages.h" #include "ipc/StrandCoord.h" #include "ipc/TypedMsgHdr.h" - Ipc::StrandCoord::StrandCoord(): kidId(-1), pid(0) { } @@ -36,7 +34,6 @@ void Ipc::StrandCoord::pack(TypedMsgHdr &hdrMsg) const hdrMsg.putString(tag); } - Ipc::HereIamMessage::HereIamMessage(const StrandCoord &aStrand): strand(aStrand) { diff --git a/src/ipc/StrandCoord.h b/src/ipc/StrandCoord.h index d6fc5f8269..b455f06823 100644 --- a/src/ipc/StrandCoord.h +++ b/src/ipc/StrandCoord.h @@ -41,8 +41,6 @@ public: StrandCoord strand; ///< registrant coordinates and related details }; - - } // namespace Ipc; #endif /* SQUID_IPC_STRAND_COORD_H */ diff --git a/src/ipc/StrandSearch.cc b/src/ipc/StrandSearch.cc index b23fe37107..9a3461e5ac 100644 --- a/src/ipc/StrandSearch.cc +++ b/src/ipc/StrandSearch.cc @@ -5,13 +5,11 @@ * */ - #include "squid.h" #include "ipc/Messages.h" #include "ipc/StrandSearch.h" #include "ipc/TypedMsgHdr.h" - Ipc::StrandSearchRequest::StrandSearchRequest(): requestorId(-1) { } @@ -31,7 +29,6 @@ void Ipc::StrandSearchRequest::pack(TypedMsgHdr &hdrMsg) const hdrMsg.putString(tag); } - /* StrandSearchResponse */ Ipc::StrandSearchResponse::StrandSearchResponse(const Ipc::StrandCoord &aStrand): diff --git a/src/ipc/TypedMsgHdr.cc b/src/ipc/TypedMsgHdr.cc index 74e7181768..68e011064a 100644 --- a/src/ipc/TypedMsgHdr.cc +++ b/src/ipc/TypedMsgHdr.cc @@ -5,7 +5,6 @@ * */ - #include "squid.h" #include "protos.h" #include "base/TextException.h" @@ -61,8 +60,6 @@ void Ipc::TypedMsgHdr::sync() offset = 0; } - - int Ipc::TypedMsgHdr::type() const { diff --git a/src/ipc/UdsOp.cc b/src/ipc/UdsOp.cc index 12b03d0d4f..2c5a211a77 100644 --- a/src/ipc/UdsOp.cc +++ b/src/ipc/UdsOp.cc @@ -5,7 +5,6 @@ * */ - #include "squid.h" #include "comm.h" #include "CommCalls.h" @@ -14,7 +13,6 @@ #include "base/TextException.h" #include "ipc/UdsOp.h" - Ipc::UdsOp::UdsOp(const String& pathAddr): AsyncJob("Ipc::UdsOp"), address(PathToAddress(pathAddr)), @@ -68,7 +66,6 @@ void Ipc::UdsOp::noteTimeout(const CommTimeoutCbParams &) timedout(); // our kid handles communication timeout } - struct sockaddr_un Ipc::PathToAddress(const String& pathAddr) { assert(pathAddr.size() != 0); @@ -79,7 +76,6 @@ Ipc::PathToAddress(const String& pathAddr) { return unixAddr; } - CBDATA_NAMESPACED_CLASS_INIT(Ipc, UdsSender); Ipc::UdsSender::UdsSender(const String& pathAddr, const TypedMsgHdr& aMessage): @@ -131,7 +127,6 @@ void Ipc::UdsSender::timedout() mustStop("timedout"); } - void Ipc::SendMessage(const String& toAddress, const TypedMsgHdr &message) { AsyncJob::Start(new UdsSender(toAddress, message)); diff --git a/src/ipc/UdsOp.h b/src/ipc/UdsOp.h index cccc6b2bd8..86064462e6 100644 --- a/src/ipc/UdsOp.h +++ b/src/ipc/UdsOp.h @@ -8,7 +8,6 @@ #ifndef SQUID_IPC_ASYNCUDSOP_H #define SQUID_IPC_ASYNCUDSOP_H - #include "SquidString.h" #include "base/AsyncJob.h" #include "cbdata.h" @@ -60,8 +59,6 @@ private: /// converts human-readable filename path into UDS address extern struct sockaddr_un PathToAddress(const String &pathAddr); - - // XXX: move UdsSender code to UdsSender.{cc,h} /// attempts to send an IPC message a few times, with a timeout class UdsSender: public UdsOp @@ -91,12 +88,10 @@ private: CBDATA_CLASS2(UdsSender); }; - void SendMessage(const String& toAddress, const TypedMsgHdr& message); /// import socket fd from another strand into our Comm state const Comm::ConnectionPointer & ImportFdIntoComm(const Comm::ConnectionPointer &conn, int socktype, int protocol, FdNoteId noteId); - } #endif /* SQUID_IPC_ASYNCUDSOP_H */ diff --git a/src/ipc/mem/Page.cc b/src/ipc/mem/Page.cc index 283dfcf8a8..e893bc14f7 100644 --- a/src/ipc/mem/Page.cc +++ b/src/ipc/mem/Page.cc @@ -12,7 +12,6 @@ #include #endif - std::ostream &Ipc::Mem::operator <<(std::ostream &os, const PageId &page) { return os << "sh_page" << page.pool << '.' << page.number; diff --git a/src/ipc/mem/PagePool.cc b/src/ipc/mem/PagePool.cc index 532003cf97..42331379bb 100644 --- a/src/ipc/mem/PagePool.cc +++ b/src/ipc/mem/PagePool.cc @@ -10,7 +10,6 @@ #include "ipc/mem/Page.h" #include "ipc/mem/PagePool.h" - // Ipc::Mem::PagePool Ipc::Mem::PagePool::Owner * diff --git a/src/ipc/mem/PageStack.cc b/src/ipc/mem/PageStack.cc index 25d8497507..5e1225839f 100644 --- a/src/ipc/mem/PageStack.cc +++ b/src/ipc/mem/PageStack.cc @@ -14,7 +14,6 @@ /// used to mark a stack slot available for storing free page offsets const Ipc::Mem::PageStack::Value Writable = 0; - Ipc::Mem::PageStack::PageStack(const uint32_t aPoolId, const unsigned int aCapacity, const size_t aPageSize): thePoolId(aPoolId), theCapacity(aCapacity), thePageSize(aPageSize), theSize(theCapacity), diff --git a/src/ipc/mem/Pages.cc b/src/ipc/mem/Pages.cc index ffef2f7224..c99f4d5e19 100644 --- a/src/ipc/mem/Pages.cc +++ b/src/ipc/mem/Pages.cc @@ -104,7 +104,6 @@ private: RunnerRegistrationEntry(rrAfterConfig, SharedMemPagesRr); - void SharedMemPagesRr::run(const RunnerRegistry &r) { diff --git a/src/ipc/mem/Pages.h b/src/ipc/mem/Pages.h index bb626d10e3..73bead4140 100644 --- a/src/ipc/mem/Pages.h +++ b/src/ipc/mem/Pages.h @@ -25,7 +25,6 @@ void PutPage(PageId &page); /// converts page handler into a temporary writeable shared memory pointer char *PagePointer(const PageId &page); - /* Limits and statistics */ /// the total number of shared memory pages that can be in use at any time diff --git a/src/ipc/mem/Segment.cc b/src/ipc/mem/Segment.cc index e5f5b5f8ce..8ce9bc95da 100644 --- a/src/ipc/mem/Segment.cc +++ b/src/ipc/mem/Segment.cc @@ -16,7 +16,6 @@ #include #include - // test cases change this const char *Ipc::Mem::Segment::BasePath = DEFAULT_STATEDIR; diff --git a/src/ipcache.cc b/src/ipcache.cc index 8a231245f8..227b3ab076 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -177,8 +177,6 @@ ipcache_entry::age() const return request_time.tv_sec ? tvSubMsec(request_time, current_time) : -1; } - - /** \ingroup IPCacheInternal * @@ -712,7 +710,6 @@ ipcacheRegisterWithCacheManager(void) stat_ipcache_get, 0, 1); } - /** \ingroup IPCacheAPI * diff --git a/src/log/ModDaemon.cc b/src/log/ModDaemon.cc index 4714559a7c..f603a9559e 100644 --- a/src/log/ModDaemon.cc +++ b/src/log/ModDaemon.cc @@ -226,7 +226,6 @@ logfileFlushEvent(void *data) eventAdd("logfileFlush", logfileFlushEvent, lf, 1.0, 1); } - /* External code */ int diff --git a/src/log/ModSyslog.cc b/src/log/ModSyslog.cc index 4cf66665ca..4d35914c7f 100644 --- a/src/log/ModSyslog.cc +++ b/src/log/ModSyslog.cc @@ -153,8 +153,6 @@ logfile_mod_syslog_close(Logfile * lf) lf->data = NULL; } - - /* * This code expects the path to be syslog: */ diff --git a/src/log/ModTcp.cc b/src/log/ModTcp.cc index ab27445f46..dad3fa140c 100644 --- a/src/log/ModTcp.cc +++ b/src/log/ModTcp.cc @@ -149,8 +149,6 @@ logfile_mod_tcp_close(Logfile * lf) lf->data = NULL; } - - /* * This code expects the path to be //host:port */ diff --git a/src/log/ModUdp.cc b/src/log/ModUdp.cc index e470714ba2..8ef18dba2d 100644 --- a/src/log/ModUdp.cc +++ b/src/log/ModUdp.cc @@ -147,8 +147,6 @@ logfile_mod_udp_close(Logfile * lf) lf->data = NULL; } - - /* * This code expects the path to be //host:port */ diff --git a/src/log/access_log.cc b/src/log/access_log.cc index 997dc477d1..f8f0188ab3 100644 --- a/src/log/access_log.cc +++ b/src/log/access_log.cc @@ -32,7 +32,6 @@ * */ - #include "squid.h" #include "AccessLogEntry.h" #include "Store.h" diff --git a/src/mem.cc b/src/mem.cc index 038f38c7ca..90992ade03 100644 --- a/src/mem.cc +++ b/src/mem.cc @@ -199,7 +199,6 @@ memDataInit(mem_type type, const char *name, size_t size, int max_pages_notused, MemPools[type]->zeroOnPush(zeroOnPush); } - /* find appropriate pool and use it (pools always init buffer with 0s) */ void * memAllocate(mem_type type) diff --git a/src/mgr/Action.cc b/src/mgr/Action.cc index c5d13e4571..e4dd59a924 100644 --- a/src/mgr/Action.cc +++ b/src/mgr/Action.cc @@ -19,7 +19,6 @@ #include "SquidTime.h" #include "Store.h" - Mgr::Action::Action(const Command::Pointer &aCmd): cmd(aCmd) { Must(cmd != NULL); diff --git a/src/mgr/Action.h b/src/mgr/Action.h index d1f6d1df7f..5d29a6b006 100644 --- a/src/mgr/Action.h +++ b/src/mgr/Action.h @@ -27,7 +27,6 @@ public: Action(const CommandPointer &aCmd); virtual ~Action(); - /* for local Cache Manager use */ /// collect + fillEntry: collect local information and fill the store entry @@ -36,13 +35,11 @@ public: /// prepare store entry, dump info, close store entry (if possible) void fillEntry(StoreEntry *entry, bool writeHttpHeader); - /* for global Coordinator use */ /// incrementally merge in remote information (of the same action type) virtual void add(const Action &action); - /* global-local communication */ /// respond to Coordinator request; default is to collect and sendResponse @@ -56,7 +53,6 @@ public: /// notify Coordinator that this action is done with local processing void sendResponse(unsigned int requestId); - /* Action properties */ /// whether at least some local kid info can be combined and, hence, the @@ -79,11 +75,9 @@ protected: */ virtual void dump(StoreEntry *entry) {} - private: const CommandPointer cmd; ///< the command that caused this action - private: Action(const Action &); // not implemented Action &operator= (const Action &); // not implemented diff --git a/src/mgr/ActionWriter.cc b/src/mgr/ActionWriter.cc index 3ad3d0f506..e51cd66974 100644 --- a/src/mgr/ActionWriter.cc +++ b/src/mgr/ActionWriter.cc @@ -11,7 +11,6 @@ #include "mgr/ActionWriter.h" #include "Store.h" - CBDATA_NAMESPACED_CLASS_INIT(Mgr, ActionWriter); Mgr::ActionWriter::ActionWriter(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn): diff --git a/src/mgr/ActionWriter.h b/src/mgr/ActionWriter.h index 0180c44c85..95f98de998 100644 --- a/src/mgr/ActionWriter.h +++ b/src/mgr/ActionWriter.h @@ -12,7 +12,6 @@ #include "HttpRequestMethod.h" #include "mgr/StoreToCommWriter.h" - namespace Mgr { diff --git a/src/mgr/BasicActions.h b/src/mgr/BasicActions.h index 495e5bff2b..291f7e486b 100644 --- a/src/mgr/BasicActions.h +++ b/src/mgr/BasicActions.h @@ -12,7 +12,6 @@ /* a collection of simple, mostly stateless actions */ - namespace Mgr { @@ -31,7 +30,6 @@ protected: IndexAction(const CommandPointer &cmd); }; - /// returns available Cache Manager actions and their access requirements class MenuAction: public Action { @@ -44,7 +42,6 @@ protected: MenuAction(const CommandPointer &cmd); }; - /// shuts Squid down class ShutdownAction: public Action { diff --git a/src/mgr/CountersAction.cc b/src/mgr/CountersAction.cc index a033e6fdb5..f138888c26 100644 --- a/src/mgr/CountersAction.cc +++ b/src/mgr/CountersAction.cc @@ -14,7 +14,6 @@ #include "SquidTime.h" #include "Store.h" - extern void GetCountersStats(Mgr::CountersActionData& stats); extern void DumpCountersStats(Mgr::CountersActionData& stats, StoreEntry* sentry); diff --git a/src/mgr/CountersAction.h b/src/mgr/CountersAction.h index 447bb8bcca..5b32f7b474 100644 --- a/src/mgr/CountersAction.h +++ b/src/mgr/CountersAction.h @@ -11,7 +11,6 @@ #include "mgr/Action.h" #include - namespace Mgr { diff --git a/src/mgr/Filler.cc b/src/mgr/Filler.cc index a43caf5752..89828a0846 100644 --- a/src/mgr/Filler.cc +++ b/src/mgr/Filler.cc @@ -12,7 +12,6 @@ #include "mgr/Response.h" #include "Store.h" - CBDATA_NAMESPACED_CLASS_INIT(Mgr, Filler); Mgr::Filler::Filler(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn, diff --git a/src/mgr/Forwarder.cc b/src/mgr/Forwarder.cc index 19493a37b9..5ede4f7cdc 100644 --- a/src/mgr/Forwarder.cc +++ b/src/mgr/Forwarder.cc @@ -20,10 +20,8 @@ #include "SquidTime.h" #include "Store.h" - CBDATA_NAMESPACED_CLASS_INIT(Mgr, Forwarder); - Mgr::Forwarder::Forwarder(const Comm::ConnectionPointer &aConn, const ActionParams &aParams, HttpRequest* aRequest, StoreEntry* anEntry): Ipc::Forwarder(new Request(KidIdentifier, 0, aConn, aParams), 10), diff --git a/src/mgr/Forwarder.h b/src/mgr/Forwarder.h index 473c543238..00a65001d9 100644 --- a/src/mgr/Forwarder.h +++ b/src/mgr/Forwarder.h @@ -12,7 +12,6 @@ #include "ipc/Forwarder.h" #include "mgr/ActionParams.h" - class CommCloseCbParams; class HttpRequest; class StoreEntry; diff --git a/src/mgr/FunAction.cc b/src/mgr/FunAction.cc index 8757d2e6e4..855c40973f 100644 --- a/src/mgr/FunAction.cc +++ b/src/mgr/FunAction.cc @@ -17,7 +17,6 @@ #include "protos.h" #include "Store.h" - Mgr::FunAction::Pointer Mgr::FunAction::Create(const Command::Pointer &aCmd, OBJH* aHandler) { diff --git a/src/mgr/FunAction.h b/src/mgr/FunAction.h index d3fe89784e..d77ee2052f 100644 --- a/src/mgr/FunAction.h +++ b/src/mgr/FunAction.h @@ -11,7 +11,6 @@ #include "mgr/Action.h" #include "mgr/ActionCreator.h" - namespace Mgr { @@ -38,7 +37,6 @@ private: OBJH *handler; ///< legacy function that collects and dumps info }; - /// creates FunAction using ActionCreator API class FunActionCreator: public ActionCreator { diff --git a/src/mgr/InfoAction.cc b/src/mgr/InfoAction.cc index 24eb410af9..f419fbe85b 100644 --- a/src/mgr/InfoAction.cc +++ b/src/mgr/InfoAction.cc @@ -21,7 +21,6 @@ #include "SquidTime.h" #include "Store.h" - extern void GetInfo(Mgr::InfoActionData& stats); extern void DumpInfo(Mgr::InfoActionData& stats, StoreEntry* sentry); extern void DumpMallocStatistics(StoreEntry* sentry); diff --git a/src/mgr/InfoAction.h b/src/mgr/InfoAction.h index bdd9ed8baf..64b4af17eb 100644 --- a/src/mgr/InfoAction.h +++ b/src/mgr/InfoAction.h @@ -12,7 +12,6 @@ #include "StoreStats.h" #include - namespace Mgr { diff --git a/src/mgr/Inquirer.cc b/src/mgr/Inquirer.cc index 2ad65fa943..65c34f2a8e 100644 --- a/src/mgr/Inquirer.cc +++ b/src/mgr/Inquirer.cc @@ -25,10 +25,8 @@ #include #include - CBDATA_NAMESPACED_CLASS_INIT(Mgr, Inquirer); - Mgr::Inquirer::Inquirer(Action::Pointer anAction, const Request &aCause, const Ipc::StrandCoords &coords): Ipc::Inquirer(aCause.clone(), applyQueryParams(coords, aCause.params.queryParams), anAction->atomic() ? 10 : 100), diff --git a/src/mgr/IntParam.cc b/src/mgr/IntParam.cc index c2f77b1288..533e059fa1 100644 --- a/src/mgr/IntParam.cc +++ b/src/mgr/IntParam.cc @@ -10,7 +10,6 @@ #include "ipc/TypedMsgHdr.h" #include "mgr/IntParam.h" - Mgr::IntParam::IntParam(): QueryParam(QueryParam::ptInt), array() { diff --git a/src/mgr/IntParam.h b/src/mgr/IntParam.h index fcf2ac0592..e59d4a3a0a 100644 --- a/src/mgr/IntParam.h +++ b/src/mgr/IntParam.h @@ -13,7 +13,6 @@ #include "mgr/QueryParam.h" #include - namespace Mgr { diff --git a/src/mgr/IntervalAction.cc b/src/mgr/IntervalAction.cc index 2a780bc29a..1e6195caba 100644 --- a/src/mgr/IntervalAction.cc +++ b/src/mgr/IntervalAction.cc @@ -14,7 +14,6 @@ #include "SquidMath.h" #include "Store.h" - extern void GetAvgStat(Mgr::IntervalActionData& stats, int minutes, int hours); extern void DumpAvgStat(Mgr::IntervalActionData& stats, StoreEntry* sentry); diff --git a/src/mgr/IntervalAction.h b/src/mgr/IntervalAction.h index fb1b80d8fe..5b7869741e 100644 --- a/src/mgr/IntervalAction.h +++ b/src/mgr/IntervalAction.h @@ -11,7 +11,6 @@ #include "mgr/Action.h" #include - namespace Mgr { diff --git a/src/mgr/IoAction.cc b/src/mgr/IoAction.cc index 676b7f544d..04131dfb7c 100644 --- a/src/mgr/IoAction.cc +++ b/src/mgr/IoAction.cc @@ -14,7 +14,6 @@ #include "SquidMath.h" #include "Store.h" - extern void GetIoStats(Mgr::IoActionData& stats); extern void DumpIoStats(Mgr::IoActionData& stats, StoreEntry* sentry); diff --git a/src/mgr/QueryParam.h b/src/mgr/QueryParam.h index 5fc3a84d4c..d7cf6f8a33 100644 --- a/src/mgr/QueryParam.h +++ b/src/mgr/QueryParam.h @@ -11,7 +11,6 @@ #include "ipc/forward.h" #include "RefCount.h" - namespace Mgr { diff --git a/src/mgr/QueryParams.cc b/src/mgr/QueryParams.cc index 4d71b10338..f8b419f0c1 100644 --- a/src/mgr/QueryParams.cc +++ b/src/mgr/QueryParams.cc @@ -12,7 +12,6 @@ #include "mgr/StringParam.h" #include "mgr/QueryParams.h" - Mgr::QueryParam::Pointer Mgr::QueryParams::get(const String& name) const { diff --git a/src/mgr/QueryParams.h b/src/mgr/QueryParams.h index 1cfa5514d6..f575954ad4 100644 --- a/src/mgr/QueryParams.h +++ b/src/mgr/QueryParams.h @@ -14,7 +14,6 @@ #include #include - namespace Mgr { diff --git a/src/mgr/Request.cc b/src/mgr/Request.cc index 79f8235e0d..3e6da16d61 100644 --- a/src/mgr/Request.cc +++ b/src/mgr/Request.cc @@ -13,7 +13,6 @@ #include "mgr/ActionParams.h" #include "mgr/Request.h" - Mgr::Request::Request(int aRequestorId, unsigned int aRequestId, const Comm::ConnectionPointer &aConn, const ActionParams &aParams): Ipc::Request(aRequestorId, aRequestId), diff --git a/src/mgr/Request.h b/src/mgr/Request.h index 45431d3249..f93521bf9d 100644 --- a/src/mgr/Request.h +++ b/src/mgr/Request.h @@ -12,7 +12,6 @@ #include "ipc/Request.h" #include "mgr/ActionParams.h" - namespace Mgr { @@ -37,7 +36,6 @@ public: ActionParams params; ///< action name and parameters }; - } // namespace Mgr #endif /* SQUID_MGR_REQUEST_H */ diff --git a/src/mgr/Response.cc b/src/mgr/Response.cc index ab79b475db..5b708bc623 100644 --- a/src/mgr/Response.cc +++ b/src/mgr/Response.cc @@ -14,7 +14,6 @@ #include "mgr/ActionProfile.h" #include "mgr/Response.h" - Mgr::Response::Response(unsigned int aRequestId, Action::Pointer anAction): Ipc::Response(aRequestId), action(anAction) { diff --git a/src/mgr/Response.h b/src/mgr/Response.h index 38f5f08e7e..a2d6d52613 100644 --- a/src/mgr/Response.h +++ b/src/mgr/Response.h @@ -12,7 +12,6 @@ #include "ipc/Response.h" #include "mgr/Action.h" - namespace Mgr { diff --git a/src/mgr/ServiceTimesAction.h b/src/mgr/ServiceTimesAction.h index f8191a38b6..ae7e8037c9 100644 --- a/src/mgr/ServiceTimesAction.h +++ b/src/mgr/ServiceTimesAction.h @@ -10,7 +10,6 @@ #include "mgr/Action.h" - namespace Mgr { diff --git a/src/mgr/StoreIoAction.cc b/src/mgr/StoreIoAction.cc index be1bc6a021..f47a1fe6bc 100644 --- a/src/mgr/StoreIoAction.cc +++ b/src/mgr/StoreIoAction.cc @@ -13,7 +13,6 @@ #include "protos.h" #include "Store.h" - Mgr::StoreIoActionData::StoreIoActionData() { xmemset(this, 0, sizeof(*this)); diff --git a/src/mgr/StoreIoAction.h b/src/mgr/StoreIoAction.h index c9c2db46f1..49d3ebfcb5 100644 --- a/src/mgr/StoreIoAction.h +++ b/src/mgr/StoreIoAction.h @@ -10,7 +10,6 @@ #include "mgr/Action.h" - namespace Mgr { diff --git a/src/mgr/StoreToCommWriter.cc b/src/mgr/StoreToCommWriter.cc index a5e390c1fd..9a179d3050 100644 --- a/src/mgr/StoreToCommWriter.cc +++ b/src/mgr/StoreToCommWriter.cc @@ -16,10 +16,8 @@ #include "StoreClient.h" #include "Store.h" - CBDATA_NAMESPACED_CLASS_INIT(Mgr, StoreToCommWriter); - Mgr::StoreToCommWriter::StoreToCommWriter(const Comm::ConnectionPointer &conn, StoreEntry* anEntry): AsyncJob("Mgr::StoreToCommWriter"), clientConnection(conn), entry(anEntry), sc(NULL), writeOffset(0), closer(NULL) diff --git a/src/mgr/StoreToCommWriter.h b/src/mgr/StoreToCommWriter.h index 911f8276a9..647b6c3c66 100644 --- a/src/mgr/StoreToCommWriter.h +++ b/src/mgr/StoreToCommWriter.h @@ -13,7 +13,6 @@ #include "mgr/Action.h" #include "StoreIOBuffer.h" - class store_client; class CommIoCbParams; class CommCloseCbParams; diff --git a/src/mgr/StringParam.cc b/src/mgr/StringParam.cc index 8d0f7a2eca..0677941a5b 100644 --- a/src/mgr/StringParam.cc +++ b/src/mgr/StringParam.cc @@ -9,7 +9,6 @@ #include "ipc/TypedMsgHdr.h" #include "mgr/StringParam.h" - Mgr::StringParam::StringParam(): QueryParam(QueryParam::ptString), str() { diff --git a/src/mgr/StringParam.h b/src/mgr/StringParam.h index e690b8d6c7..3731a27eb6 100644 --- a/src/mgr/StringParam.h +++ b/src/mgr/StringParam.h @@ -13,7 +13,6 @@ #include "mgr/QueryParam.h" #include "SquidString.h" - namespace Mgr { diff --git a/src/mime.cc b/src/mime.cc index 8e06998d35..9e63b7bc42 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -172,7 +172,6 @@ MimeIcon::_free() safe_free (url); } - char const * mimeGetIcon(const char *fn) { diff --git a/src/mime_header.cc b/src/mime_header.cc index d24e20469e..e87dac74b9 100644 --- a/src/mime_header.cc +++ b/src/mime_header.cc @@ -119,7 +119,6 @@ mime_get_header(const char *mime, const char *name) return mime_get_header_field(mime, name, NULL); } - size_t headersEnd(const char *mime, size_t l) { diff --git a/src/neighbors.cc b/src/neighbors.cc index 10a07e60be..2b78b1769a 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -98,7 +98,6 @@ neighborTypeStr(const peer * p) return "Parent"; } - peer * whichPeer(const Ip::Address &from) { diff --git a/src/pconn.h b/src/pconn.h index 26a5062a05..836409e598 100644 --- a/src/pconn.h +++ b/src/pconn.h @@ -90,7 +90,6 @@ private: CBDATA_CLASS2(IdleConnList); }; - #include "ip/forward.h" class StoreEntry; @@ -145,7 +144,6 @@ private: int theCount; ///< the number of pooled connections }; - class StoreEntry; class PconnPool; diff --git a/src/peer_digest.cc b/src/peer_digest.cc index 3452281b11..93f15c9f3b 100644 --- a/src/peer_digest.cc +++ b/src/peer_digest.cc @@ -70,7 +70,6 @@ static void peerDigestFetchSetStats(DigestFetchState * fetch); static int peerDigestSetCBlock(PeerDigest * pd, const char *buf); static int peerDigestUseful(const PeerDigest * pd); - /* local constants */ Version const CacheDigestVer = { 5, 3 }; @@ -405,7 +404,6 @@ peerDigestRequest(PeerDigest * pd) peerDigestHandleReply, fetch); } - /* Handle the data copying .. */ /* @@ -515,8 +513,6 @@ finish: cbdataReferenceDone(fetch); } - - /* wait for full http headers to be received then parse them */ /* * This routine handles parsing the reply line. @@ -865,7 +861,6 @@ peerDigestReqFinish(DigestFetchState * fetch, char *buf, peerDigestFetchFinish(fetch, err); } - /* destroys digest if peer disappeared * must be called only when fetch and pd cbdata are valid */ static void @@ -980,7 +975,6 @@ peerDigestFetchSetStats(DigestFetchState * fetch) } - static int peerDigestSetCBlock(PeerDigest * pd, const char *buf) { diff --git a/src/peer_proxy_negotiate_auth.cc b/src/peer_proxy_negotiate_auth.cc index 28483cf388..a5971b9d5a 100644 --- a/src/peer_proxy_negotiate_auth.cc +++ b/src/peer_proxy_negotiate_auth.cc @@ -534,7 +534,6 @@ restart: output_token.length); } - cleanup: gss_delete_sec_context(&minor_status, &gss_context, NULL); gss_release_buffer(&minor_status, &service); diff --git a/src/peer_select.cc b/src/peer_select.cc index de8e41cc2b..2be99c442c 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -135,7 +135,6 @@ peerSelectIcpPing(HttpRequest * request, int direct, StoreEntry * entry) return n; } - void peerSelect(Comm::ConnectionList * paths, HttpRequest * request, @@ -580,7 +579,6 @@ peerGetSomeNeighbor(ps_state * ps) " ICP replies expected, RTT " << ps->ping.timeout << " msec"); - if (ps->ping.n_replies_expected > 0) { entry->ping_status = PING_WAITING; eventAdd("peerPingTimeout", @@ -639,7 +637,6 @@ peerGetSomeNeighborReplies(ps_state * ps) } } - /* * peerGetSomeDirect * diff --git a/src/peer_userhash.cc b/src/peer_userhash.cc index 342119209c..11ea331f4d 100644 --- a/src/peer_userhash.cc +++ b/src/peer_userhash.cc @@ -84,7 +84,6 @@ peerUserHashInit(void) n_userhash_peers = 0; /* find out which peers we have */ - peerUserHashRegisterWithCacheManager(); for (p = Config.peers; p; p = p->next) { diff --git a/src/protos.h b/src/protos.h index ad0d82460f..b49336a21d 100644 --- a/src/protos.h +++ b/src/protos.h @@ -43,13 +43,11 @@ /* for parameters that still need these */ #include "lookup_t.h" - class HttpRequestMethod; #if USE_DELAY_POOLS class ClientInfo; #endif - #if USE_FORW_VIA_DB extern void fvdbCountVia(const char *key); extern void fvdbCountForw(const char *key); @@ -70,7 +68,6 @@ SQUIDCEXTERN void add_http_port(char *portspec); extern int xatoi(const char *token); extern long xatol(const char *token); - /* extra functions from cache_cf.c useful for lib modules */ SQUIDCEXTERN void parse_int(int *var); SQUIDCEXTERN void parse_onoff(int *var); @@ -79,7 +76,6 @@ SQUIDCEXTERN void parse_wordlist(wordlist ** list); SQUIDCEXTERN void requirePathnameExists(const char *name, const char *path); SQUIDCEXTERN void parse_time_t(time_t * var); - /* client_side.c - FD related client side routines */ SQUIDCEXTERN void clientdbInit(void); @@ -163,7 +159,6 @@ class HttpReply; /// \ingroup ServerProtocolFTPAPI SQUIDCEXTERN const char *ftpUrlWith2f(HttpRequest *); - /** \defgroup ServerProtocolGopherAPI Server-Side Gopher API \ingroup ServerProtocol @@ -175,7 +170,6 @@ SQUIDCEXTERN void gopherStart(FwdState *); /// \ingroup ServerProtocolGopherAPI SQUIDCEXTERN int gopherCachable(const HttpRequest *); - /** \defgroup ServerProtocolWhoisAPI Server-Side WHOIS API \ingroup ServerProtocol @@ -184,7 +178,6 @@ SQUIDCEXTERN int gopherCachable(const HttpRequest *); /// \ingroup ServerProtocolWhoisAPI SQUIDCEXTERN void whoisStart(FwdState *); - /* http.c */ /* for http_hdr_type field */ #include "HttpHeader.h" @@ -223,7 +216,6 @@ SQUIDCEXTERN const char *getStringPrefix(const char *str, const char *end); SQUIDCEXTERN int httpHeaderParseInt(const char *start, int *val); SQUIDCEXTERN void httpHeaderPutStrf(HttpHeader * hdr, http_hdr_type id, const char *fmt,...) PRINTF_FORMAT_ARG3; - /* Http Header */ SQUIDCEXTERN void httpHeaderInitModule(void); SQUIDCEXTERN void httpHeaderCleanModule(void); @@ -357,7 +349,6 @@ extern void shut_down(int); extern void rotate_logs(int); extern void reconfigure(int); - extern void start_announce(void *unused); extern void waisStart(FwdState *); @@ -395,7 +386,6 @@ SQUIDCEXTERN int memInUse(mem_type); SQUIDCEXTERN void memDataInit(mem_type, const char *, size_t, int, bool zeroOnPush = true); SQUIDCEXTERN void memCheckInit(void); - /* Mem */ SQUIDCEXTERN void memConfigure(void); @@ -412,7 +402,6 @@ extern void storeLogRotate(void); extern void storeLogClose(void); extern void storeLogOpen(void); - /* * store_key_*.c */ @@ -455,7 +444,6 @@ extern bool storeRebuildParseEntry(MemBuf &buf, StoreEntry &e, cache_key *key, s /// checks whether the loaded entry should be kept; updates counters extern bool storeRebuildKeepEntry(const StoreEntry &e, const cache_key *key, struct _store_rebuild_data &counts); - /* * store_swapin.c */ @@ -472,7 +460,6 @@ SQUIDCEXTERN int storeUnregister(store_client * sc, StoreEntry * e, void *data) SQUIDCEXTERN int storePendingNClients(const StoreEntry * e); SQUIDCEXTERN int storeClientIsThisAClient(store_client * sc, void *someClient); - SQUIDCEXTERN const char *getMyHostname(void); SQUIDCEXTERN const char *uniqueHostname(void); SQUIDCEXTERN void safeunlink(const char *path, int quiet); @@ -582,7 +569,6 @@ SQUIDCEXTERN void setUmask(mode_t mask); SQUIDCEXTERN char *strwordtok(char *buf, char **t); SQUIDCEXTERN void strwordquote(MemBuf * mb, const char *str); - /* * ipc.c */ diff --git a/src/recv-announce.cc b/src/recv-announce.cc index f9a3446eaa..9130bb609a 100644 --- a/src/recv-announce.cc +++ b/src/recv-announce.cc @@ -76,7 +76,6 @@ sig_handle(int) exit(0); } - int main(int argc, char *argv[]) { @@ -93,7 +92,6 @@ main(int argc, char *argv[]) signal(len, sig_handle); } - if (argc > 1) logfile = argv[1]; else @@ -109,7 +107,6 @@ main(int argc, char *argv[]) close(2); dup(1); - IPAddress ipa; chat tmp[MAX_HOSTNAMELEN]; for (;;) { diff --git a/src/repl/heap/store_heap_replacement.cc b/src/repl/heap/store_heap_replacement.cc index a0e607cc1b..b005a45a77 100644 --- a/src/repl/heap/store_heap_replacement.cc +++ b/src/repl/heap/store_heap_replacement.cc @@ -98,7 +98,6 @@ HeapKeyGen_StoreEntry_LFUDA(void *entry, double heap_age) return (double) key; } - /* * Key generation function to implement the GDS-Frequency policy. * Similar to Greedy Dual-Size Hits policy, but adds aging of diff --git a/src/snmp/Forwarder.cc b/src/snmp/Forwarder.cc index 4bf1f9185a..43ec4f1794 100644 --- a/src/snmp/Forwarder.cc +++ b/src/snmp/Forwarder.cc @@ -16,10 +16,8 @@ #include "snmp/Request.h" #include "snmp/Response.h" - CBDATA_NAMESPACED_CLASS_INIT(Snmp, Forwarder); - Snmp::Forwarder::Forwarder(const Pdu& aPdu, const Session& aSession, int aFd, const Ip::Address& anAddress): Ipc::Forwarder(new Request(KidIdentifier, 0, aPdu, aSession, aFd, anAddress), 2), diff --git a/src/snmp/Forwarder.h b/src/snmp/Forwarder.h index aba0b17207..a809fcf06b 100644 --- a/src/snmp/Forwarder.h +++ b/src/snmp/Forwarder.h @@ -12,7 +12,6 @@ #include "snmp/Pdu.h" #include "snmp/Session.h" - class CommCloseCbParams; namespace Snmp diff --git a/src/snmp/Inquirer.cc b/src/snmp/Inquirer.cc index 2d2a992bc0..d0b3779915 100644 --- a/src/snmp/Inquirer.cc +++ b/src/snmp/Inquirer.cc @@ -16,10 +16,8 @@ #include "snmp/Response.h" #include "snmp/Request.h" - CBDATA_NAMESPACED_CLASS_INIT(Snmp, Inquirer); - Snmp::Inquirer::Inquirer(const Request& aRequest, const Ipc::StrandCoords& coords): Ipc::Inquirer(aRequest.clone(), coords, 2), aggrPdu(aRequest.pdu) diff --git a/src/snmp/Inquirer.h b/src/snmp/Inquirer.h index e9990a34b3..0dece21577 100644 --- a/src/snmp/Inquirer.h +++ b/src/snmp/Inquirer.h @@ -13,7 +13,6 @@ #include "snmp/forward.h" #include "snmp/Pdu.h" - class CommCloseCbParams; namespace Snmp diff --git a/src/snmp/Pdu.cc b/src/snmp/Pdu.cc index b0b37fc33e..10d09a8138 100644 --- a/src/snmp/Pdu.cc +++ b/src/snmp/Pdu.cc @@ -16,7 +16,6 @@ #include #endif - Snmp::Pdu::Pdu() { init(); diff --git a/src/snmp/Pdu.h b/src/snmp/Pdu.h index 01c44e9bb7..814b362077 100644 --- a/src/snmp/Pdu.h +++ b/src/snmp/Pdu.h @@ -12,7 +12,6 @@ #include "Range.h" #include "snmp.h" - namespace Snmp { diff --git a/src/snmp/Request.cc b/src/snmp/Request.cc index 4081b77fe8..a1ed1da9e0 100644 --- a/src/snmp/Request.cc +++ b/src/snmp/Request.cc @@ -10,7 +10,6 @@ #include "ipc/TypedMsgHdr.h" #include "snmp/Request.h" - Snmp::Request::Request(int aRequestorId, unsigned int aRequestId, const Pdu& aPdu, const Session& aSession, int aFd, const Ip::Address& anAddress): diff --git a/src/snmp/Request.h b/src/snmp/Request.h index f515b0b2ab..31ff624eca 100644 --- a/src/snmp/Request.h +++ b/src/snmp/Request.h @@ -14,7 +14,6 @@ #include "snmp/Pdu.h" #include "snmp/Session.h" - namespace Snmp { @@ -40,7 +39,6 @@ public: Ip::Address address; ///< client address }; - } // namespace Snmp #endif /* SQUID_SNMPX_REQUEST_H */ diff --git a/src/snmp/Response.cc b/src/snmp/Response.cc index 2ec5374ae4..f993cd4534 100644 --- a/src/snmp/Response.cc +++ b/src/snmp/Response.cc @@ -11,7 +11,6 @@ #include "ipc/TypedMsgHdr.h" #include "snmp/Response.h" - std::ostream& Snmp::operator << (std::ostream& os, const Response& response) { os << "response: {requestId: " << response.requestId << '}'; diff --git a/src/snmp/Session.cc b/src/snmp/Session.cc index 155e0eb58f..0afb380a0a 100644 --- a/src/snmp/Session.cc +++ b/src/snmp/Session.cc @@ -11,7 +11,6 @@ #include "protos.h" #include "snmp/Session.h" - Snmp::Session::Session() { clear(); diff --git a/src/snmp/Session.h b/src/snmp/Session.h index 4e92538eed..89a433530b 100644 --- a/src/snmp/Session.h +++ b/src/snmp/Session.h @@ -12,7 +12,6 @@ #include "snmp.h" #include "snmp_session.h" - namespace Snmp { diff --git a/src/snmp/Var.cc b/src/snmp/Var.cc index f05e6220ac..93b0cde846 100644 --- a/src/snmp/Var.cc +++ b/src/snmp/Var.cc @@ -14,7 +14,6 @@ #include #endif - Snmp::Var::Var() { init(); diff --git a/src/snmp/Var.h b/src/snmp/Var.h index ab672212f2..483cf83c48 100644 --- a/src/snmp/Var.h +++ b/src/snmp/Var.h @@ -12,7 +12,6 @@ #include "Range.h" #include "snmp_vars.h" - namespace Snmp { diff --git a/src/snmp_agent.cc b/src/snmp_agent.cc index d0ab68419e..7d6ec81d56 100644 --- a/src/snmp_agent.cc +++ b/src/snmp_agent.cc @@ -194,7 +194,6 @@ snmp_confFn(variable_list * Var, snint * ErrP) return Answer; } - /* * cacheMesh group * - cachePeerTable @@ -224,7 +223,6 @@ snmp_meshPtblFn(variable_list * Var, snint * ErrP) return NULL; } - switch (Var->name[LEN_SQ_MESH + 2]) { case MESH_PTBL_INDEX: { // FIXME INET6: Should be visible? Answer = snmp_var_new_integer(Var->name, Var->name_length, @@ -232,7 +230,6 @@ snmp_meshPtblFn(variable_list * Var, snint * ErrP) } break; - case MESH_PTBL_NAME: cp = p->host; Answer = snmp_var_new(Var->name, Var->name_length); diff --git a/src/snmp_core.cc b/src/snmp_core.cc index b96d624f83..fa1314555b 100644 --- a/src/snmp_core.cc +++ b/src/snmp_core.cc @@ -643,7 +643,6 @@ snmpTreeNext(oid * Current, snint CurrentLen, oid ** Next, snint * NextLen) if (mibTreeEntry == mib_tree_last) return (Fn); - if ((mibTreeEntry) && (mibTreeEntry->parsefunction)) { *NextLen = CurrentLen; *Next = (*mibTreeEntry->instancefunction) (Current, NextLen, mibTreeEntry, &Fn); @@ -742,7 +741,6 @@ time_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn) return (instance); } - static oid * peer_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn) { @@ -1003,7 +1001,6 @@ snmpAddNodeStr(const char *base_str, int o, oid_ParseFn * parsefunction, instanc return m; } - /* * Adds a node to the MIB tree structure and adds the appropriate children */ @@ -1087,8 +1084,6 @@ snmpSnmplibDebug(int lvl, char *buf) debugs(49, lvl, buf); } - - /* IPv4 address: 10.10.0.9 ==> oid == 10.10.0.9 diff --git a/src/snmp_core.h b/src/snmp_core.h index e66047133b..ce1947b8dc 100644 --- a/src/snmp_core.h +++ b/src/snmp_core.h @@ -14,7 +14,6 @@ #define SNMP_REQUEST_SIZE 4096 #define MAX_PROTOSTAT 5 - typedef struct _mib_tree_entry mib_tree_entry; typedef oid *(instance_Fn) (oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn); typedef enum {atNone = 0, atSum, atAverage, atMax, atMin} AggrType; diff --git a/src/ssl/ErrorDetailManager.cc b/src/ssl/ErrorDetailManager.cc index da299df308..af2c5178fb 100644 --- a/src/ssl/ErrorDetailManager.cc +++ b/src/ssl/ErrorDetailManager.cc @@ -87,7 +87,6 @@ void Ssl::ErrorDetailsManager::Shutdown() TheDetailsManager = NULL; } - Ssl::ErrorDetailsManager::ErrorDetailsManager() { theDefaultErrorDetails = new ErrorDetailsList(); diff --git a/src/ssl/ErrorDetailManager.h b/src/ssl/ErrorDetailManager.h index 334c80f46c..7e69e8db11 100644 --- a/src/ssl/ErrorDetailManager.h +++ b/src/ssl/ErrorDetailManager.h @@ -87,7 +87,6 @@ private: static ErrorDetailsManager *TheDetailsManager; }; - void errorDetailInitialize(); void errorDetailClean(); } //namespace Ssl diff --git a/src/ssl/ServerBump.cc b/src/ssl/ServerBump.cc index 13de802110..e76df7d552 100644 --- a/src/ssl/ServerBump.cc +++ b/src/ssl/ServerBump.cc @@ -13,10 +13,8 @@ #include "ssl/ServerBump.h" #include "Store.h" - CBDATA_NAMESPACED_CLASS_INIT(Ssl, ServerBump); - Ssl::ServerBump::ServerBump(HttpRequest *fakeRequest, StoreEntry *e): request(fakeRequest), sslErrors(NULL) diff --git a/src/ssl/certificate_db.cc b/src/ssl/certificate_db.cc index 3f8069aa07..6bd66d6228 100644 --- a/src/ssl/certificate_db.cc +++ b/src/ssl/certificate_db.cc @@ -56,7 +56,6 @@ void Ssl::Lock::lock() #endif throw std::runtime_error("Failed to open file " + filename); - #if _SQUID_MSWIN_ if (!LockFile(hFile, 0, 0, 1, 0)) #else diff --git a/src/ssl/context_storage.h b/src/ssl/context_storage.h index 92f35ea941..6aa01c9ae0 100644 --- a/src/ssl/context_storage.h +++ b/src/ssl/context_storage.h @@ -88,7 +88,6 @@ private: Queue lru_queue; ///< LRU cache index }; - /// Class for storing/manipulating LocalContextStorage per local listening address/port. class GlobalContextStorage { diff --git a/src/ssl/crtd_message.cc b/src/ssl/crtd_message.cc index 6576e01237..975e021677 100644 --- a/src/ssl/crtd_message.cc +++ b/src/ssl/crtd_message.cc @@ -124,7 +124,6 @@ void Ssl::CrtdMessage::setBody(std::string const & aBody) { body = aBody; } void Ssl::CrtdMessage::setCode(std::string const & aCode) { code = aCode; } - std::string Ssl::CrtdMessage::compose() const { if (code.empty()) return std::string(); @@ -177,7 +176,6 @@ void Ssl::CrtdMessage::composeBody(CrtdMessage::BodyParams const & map, std::str body += '\n' + other_part; } - bool Ssl::CrtdMessage::parseRequest(Ssl::CertificateProperties &certProperties, std::string &error) { Ssl::CrtdMessage::BodyParams map; diff --git a/src/ssl/gadgets.cc b/src/ssl/gadgets.cc index 4610a7c409..c36d5505d1 100644 --- a/src/ssl/gadgets.cc +++ b/src/ssl/gadgets.cc @@ -603,7 +603,6 @@ bool Ssl::certificateMatchesProperties(X509 *cert, CertificateProperties const & return false; } - char *alStr1; int alLen; alStr1 = (char *)X509_alias_get0(cert, &alLen); diff --git a/src/ssl/gadgets.h b/src/ssl/gadgets.h index 0328701a5b..fd6ce209c7 100644 --- a/src/ssl/gadgets.h +++ b/src/ssl/gadgets.h @@ -95,7 +95,6 @@ typedef TidyPointer SSL_CTX_Pointer; CtoCpp1(SSL_free, SSL *) typedef TidyPointer SSL_Pointer; - /** \ingroup SslCrtdSslAPI * Create 1024 bits rsa key. diff --git a/src/ssl/support.cc b/src/ssl/support.cc index 3e4244021e..551b756981 100644 --- a/src/ssl/support.cc +++ b/src/ssl/support.cc @@ -1245,7 +1245,6 @@ sslGetUserCertificatePEM(SSL *ssl) PEM_write_bio_X509(mem, cert); - len = BIO_get_mem_data(mem, &ptr); str = (char *)xmalloc(len + 1); diff --git a/src/ssl/support.h b/src/ssl/support.h index 76a437d19a..3068b03aba 100644 --- a/src/ssl/support.h +++ b/src/ssl/support.h @@ -88,7 +88,6 @@ int ssl_write_method(int, const char *, int); /// \ingroup ServerProtocolSSLAPI void ssl_shutdown_method(SSL *ssl); - /// \ingroup ServerProtocolSSLAPI const char *sslGetUserEmail(SSL *ssl); diff --git a/src/stat.cc b/src/stat.cc index b6f63e3062..c089907c65 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -91,7 +91,6 @@ private: CBDATA_CLASS2(StatObjectsState); }; - /* LOCALS */ static const char *describeStatuses(const StoreEntry *); static const char *describeTimestamps(const StoreEntry *); @@ -1380,7 +1379,6 @@ statRegisterWithCacheManager(void) #endif } - void statInit(void) { diff --git a/src/stmem.cc b/src/stmem.cc index d277df270c..7ff02f3329 100644 --- a/src/stmem.cc +++ b/src/stmem.cc @@ -362,7 +362,6 @@ mem_hdr::nodeToRecieve(int64_t offset) return candidate; } - bool mem_hdr::write (StoreIOBuffer const &writeBuffer) { diff --git a/src/store.cc b/src/store.cc index fdbead6f35..399abc6b7a 100644 --- a/src/store.cc +++ b/src/store.cc @@ -71,7 +71,6 @@ static STMCB storeWriteComplete; #define STORE_IN_MEM_BUCKETS (229) - /** \todo Convert these string constants to enum string-arrays generated */ const char *memStatusStr[] = { @@ -96,7 +95,6 @@ const char *swapStatusStr[] = { "SWAPOUT_DONE" }; - /* * This defines an repl type */ @@ -110,7 +108,6 @@ struct _storerepl_entry { static storerepl_entry_t *storerepl_list = NULL; - /* * local function prototypes */ @@ -493,7 +490,6 @@ StoreEntry::hashDelete() /* -------------------------------------------------------------------------- */ - /* get rid of memory copy of the object */ void StoreEntry::purgeMem() @@ -903,7 +899,6 @@ StoreEntry::append(char const *buf, int len) write(tempBuffer); } - void storeAppendPrintf(StoreEntry * e, const char *fmt,...) { @@ -1206,7 +1201,6 @@ storeGetMemSpace(int size) PROF_stop(storeGetMemSpace); } - /* thunk through to Store::Root().maintain(). Note that this would be better still * if registered against the root store itself, but that requires more complex * update logic - bigger fish to fry first. Long term each store when @@ -1825,7 +1819,6 @@ storeSwapFileNumberSet(StoreEntry * e, sfileno filn) #endif - /* * Replace a store entry with * a new reply. This eats the reply. @@ -1846,7 +1839,6 @@ StoreEntry::replaceHttpReply(HttpReply *rep, bool andStartWriting) startWriting(); } - void StoreEntry::startWriting() { @@ -1871,7 +1863,6 @@ StoreEntry::startWriting() packerClean(&p); } - char const * StoreEntry::getSerialisedMetaData() { diff --git a/src/store_digest.cc b/src/store_digest.cc index 141e928adc..97311b67b9 100644 --- a/src/store_digest.cc +++ b/src/store_digest.cc @@ -33,7 +33,6 @@ * */ - /* * TODO: We probably do not track all the cases when * storeDigestNoteStoreReady() must be called; this may prevent @@ -77,7 +76,6 @@ public: int rewrite_count; }; - typedef struct { int del_count; /* #store entries deleted from store_digest */ int del_lost_count; /* #store entries not found in store_digest on delete */ @@ -375,7 +373,6 @@ storeDigestRebuildStep(void *datanotused) eventAdd("storeDigestRebuildStep", storeDigestRebuildStep, NULL, 0.0, 1); } - /* starts swap out sequence for the digest */ static void storeDigestRewriteStart(void *datanotused) diff --git a/src/store_dir.cc b/src/store_dir.cc index 46919af47e..303966258d 100644 --- a/src/store_dir.cc +++ b/src/store_dir.cc @@ -70,7 +70,6 @@ #include #endif - static STDIRSELECT storeDirSelectSwapDirRoundRobin; static STDIRSELECT storeDirSelectSwapDirLeastLoad; @@ -194,7 +193,6 @@ SwapDir::objectSizeIsAcceptable(int64_t objsize) const return min_objsize <= objsize && max_objsize > objsize; } - /* * This new selection scheme simply does round-robin on all SwapDirs. * A SwapDir is skipped if it is over the max_size (100%) limit, or @@ -523,7 +521,6 @@ storeDirWriteCleanLogs(int reopen) debugs(20, DBG_IMPORTANT, " Took "<< std::setw(3)<< std::setprecision(2) << dt << " seconds ("<< std::setw(6) << ((double) n / (dt > 0.0 ? dt : 1.0)) << " entries/sec)."); - return n; } diff --git a/src/store_swapmeta.cc b/src/store_swapmeta.cc index 98a9d0efdd..53ad2818fe 100644 --- a/src/store_swapmeta.cc +++ b/src/store_swapmeta.cc @@ -94,7 +94,6 @@ storeSwapMetaBuild(StoreEntry * e) return NULL; } - if (objsize >= 0) { T = StoreMeta::Add(T, t); t = StoreMeta::Factory(STORE_META_OBJSIZE, sizeof(objsize), &objsize); diff --git a/src/store_swapout.cc b/src/store_swapout.cc index 25a4c4c5e0..51eea6ed56 100644 --- a/src/store_swapout.cc +++ b/src/store_swapout.cc @@ -179,7 +179,6 @@ doPages(StoreEntry *anEntry) } while (true); } - /* This routine is called every time data is sent to the client side. * It's overhead is therefor, significant. */ diff --git a/src/structs.h b/src/structs.h index 672fcee0e3..c97e028d25 100644 --- a/src/structs.h +++ b/src/structs.h @@ -695,7 +695,6 @@ struct _fde_disk { off_t offset; }; - /* per field statistics */ class HttpHeaderFieldStat @@ -962,7 +961,6 @@ struct _iostats { Http, Ftp, Gopher; }; - struct request_flags { request_flags(): range(0),nocache(0),ims(0),auth(0),cachable(0),hierarchical(0),loopdetect(0),proxy_keepalive(0),proxying(0),refresh(0),redirected(0),need_validation(0),fail_on_validation_err(0),stale_if_hit(0),accelerated(0),ignore_cc(0),intercepted(0),hostVerified(0),spoof_client_ip(0),internal(0),internalclient(0),must_keepalive(0),pinned(0),canRePin(0),chunked_reply(0),stream_error(0),sslPeek(0),sslBumped(0),destinationIPLookedUp_(0) { #if USE_HTTP_VIOLATIONS @@ -1071,7 +1069,6 @@ struct _refresh_t { int max_stale; }; - struct _CacheDigest { /* public, read-only */ char *mask; /* bit mask */ @@ -1082,7 +1079,6 @@ struct _CacheDigest { int del_count; /* number of deletions performed so far */ }; - struct _store_rebuild_data { int objcount; /* # objects successfully reloaded */ int expcount; /* # objects expired */ diff --git a/src/test_cache_digest.cc b/src/test_cache_digest.cc index 017ef0db59..479d4503a1 100644 --- a/src/test_cache_digest.cc +++ b/src/test_cache_digest.cc @@ -64,7 +64,6 @@ struct _Cache { int bad_del_count; /* #dels with no prior add */ }; - typedef struct _CacheEntry { const cache_key *key; @@ -241,7 +240,6 @@ cacheEntryDestroy(CacheEntry * e) xfree(e); } - /* Cache */ static Cache * @@ -502,7 +500,6 @@ accessLogReader(FileIterator * fi) return frOk; } - static void cachePurge(Cache * cache, storeSwapLogData * s, int update_digest) { diff --git a/src/tests/STUB.h b/src/tests/STUB.h index 368bdb5db2..6ff76982e3 100644 --- a/src/tests/STUB.h +++ b/src/tests/STUB.h @@ -36,7 +36,6 @@ /// Intended for registration pattern APIs where the function result does not matter to the test #define STUB_RETVAL_NOP(x) { std::cerr<<"SKIP: "< - class testStatHist : public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE( testStatHist ); diff --git a/src/tests/testStore.h b/src/tests/testStore.h index c0a2ee602c..064617eca2 100644 --- a/src/tests/testStore.h +++ b/src/tests/testStore.h @@ -6,7 +6,6 @@ #include - /* * test the store framework */ @@ -29,7 +28,6 @@ protected: void testMaxSize(); }; - /* subclass of Store to allow testing of methods without having all the * other components live */ @@ -75,6 +73,5 @@ public: typedef RefCount TestStorePointer; - #endif diff --git a/src/tests/testStoreController.cc b/src/tests/testStoreController.cc index 5ee8b6d54d..a7d53229d1 100644 --- a/src/tests/testStoreController.cc +++ b/src/tests/testStoreController.cc @@ -19,7 +19,6 @@ addSwapDir(TestSwapDirPointer aStore) ++Config.cacheSwap.n_configured; } - void testStoreController::testStats() { diff --git a/src/tests/testStoreHashIndex.cc b/src/tests/testStoreHashIndex.cc index a6ed69f848..daae502a04 100644 --- a/src/tests/testStoreHashIndex.cc +++ b/src/tests/testStoreHashIndex.cc @@ -20,7 +20,6 @@ addSwapDir(TestSwapDirPointer aStore) ++Config.cacheSwap.n_configured; } - void testStoreHashIndex::testStats() { diff --git a/src/tests/testURLScheme.cc b/src/tests/testURLScheme.cc index ee49d08571..b4709f90e8 100644 --- a/src/tests/testURLScheme.cc +++ b/src/tests/testURLScheme.cc @@ -15,7 +15,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION( testURLScheme ); - #if 0 /* * We should be able to make an HttpRequestMethod straight from a string. diff --git a/src/tests/testUfs.cc b/src/tests/testUfs.cc index 7ee0e74902..4642e32d54 100644 --- a/src/tests/testUfs.cc +++ b/src/tests/testUfs.cc @@ -101,7 +101,6 @@ testUfs::testUfsSearch() commonInit(); mem_policy = createRemovalPolicy(Config.replPolicy); - char *path=xstrdup(TESTDIR); char *config_line=xstrdup("foo 100 1 1"); diff --git a/src/tools.cc b/src/tools.cc index 3bea878a80..a4f358cd0e 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -311,7 +311,6 @@ rusage_pagefaults(struct rusage *r) #endif } - void PrintRusage(void) { @@ -328,7 +327,6 @@ PrintRusage(void) rusage_pagefaults(&rusage)); } - void death(int sig) { @@ -513,7 +511,6 @@ fatalf(const char *fmt,...) va_end(args); } - /* used by fatalf */ static void fatalvf(const char *fmt, va_list args) @@ -934,7 +931,6 @@ writePidFile(void) file_close(fd); } - pid_t readPidFile(void) { diff --git a/src/tunnel.cc b/src/tunnel.cc index 547eec19ec..6ac1bfab72 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -559,7 +559,6 @@ tunnelErrorComplete(int fd/*const Comm::ConnectionPointer &*/, void *data, size_ cbdataInternalUnlock(tunnelState); } - static void tunnelConnectDone(const Comm::ConnectionPointer &conn, comm_err_t status, int xerrno, void *data) { diff --git a/src/ufsdump.cc b/src/ufsdump.cc index 46c416e3a8..c4b1b5c053 100644 --- a/src/ufsdump.cc +++ b/src/ufsdump.cc @@ -189,7 +189,6 @@ main(int argc, char *argv[]) for_each(*metadata, dumper); - return 0; } catch (std::runtime_error error) { std::cout << "Failed : " << error.what() << std::endl; diff --git a/src/url.cc b/src/url.cc index 06be990ab6..a715bb1821 100644 --- a/src/url.cc +++ b/src/url.cc @@ -626,7 +626,6 @@ urlCanonicalFakeHttps(const HttpRequest * request) return urlCanonicalClean(request); } - /* * Test if a URL is relative. * @@ -823,7 +822,6 @@ matchDomainName(const char *h, const char *d) return (xtolower(h[hl]) - xtolower(d[dl])); } - /* * return true if we can serve requests for this method. */ diff --git a/src/urn.cc b/src/urn.cc index e72cd09932..f3f1a98eff 100644 --- a/src/urn.cc +++ b/src/urn.cc @@ -64,7 +64,6 @@ public: virtual ~UrnState(); - StoreEntry *entry; store_client *sc; StoreEntry *urlres_e; diff --git a/src/wccp.cc b/src/wccp.cc index 826af323d2..7b478f75b9 100644 --- a/src/wccp.cc +++ b/src/wccp.cc @@ -41,7 +41,6 @@ #include "event.h" #include "structs.h" - #define WCCP_PORT 2048 #define WCCP_REVISION 0 #define WCCP_ACTIVE_CACHES 32 @@ -164,7 +163,6 @@ wccpConnectionOpen(void) debugs(80, DBG_IMPORTANT, "Accepting WCCPv1 messages on " << Config.Wccp.address << ", FD " << theWccpConnection << "."); - // Sadly WCCP only does IPv4 struct sockaddr_in router; @@ -181,7 +179,6 @@ wccpConnectionOpen(void) local_ip = local; } - void wccpConnectionClose(void) { diff --git a/src/wccp2.cc b/src/wccp2.cc index 45d0653b67..bb10f1bdc3 100644 --- a/src/wccp2.cc +++ b/src/wccp2.cc @@ -73,11 +73,9 @@ static EVH wccp2AssignBuckets; #define WCCP2_NUMPORTS 8 #define WCCP2_PASSWORD_LEN 8 - /* WCCPv2 Pakcet format structures */ /* Defined in draft-wilson-wccp-v2-12-oct-2001.txt */ - /** \interface WCCPv2_Protocol * Generic header struct */ @@ -100,8 +98,6 @@ struct wccp2_item_header_t { #define WCCP2_ASSIGN_MAP 14 #define WCCP2_COMMAND_EXTENSION 15 - - /** \interface WCCPv2_Protocol * Sect 5.5 WCCP Message Header */ @@ -120,7 +116,6 @@ static struct wccp2_message_header_t wccp2_here_i_am_header; #define WCCP2_REDIRECT_ASSIGN 12 #define WCCP2_REMOVAL_QUERY 13 - /** \interface WCCPv2_Protocol * Sect 5.6.1 Security Info Component * @@ -136,7 +131,6 @@ struct wccp2_security_none_t { #define WCCP2_NO_SECURITY 0 #define WCCP2_MD5_SECURITY 1 - /** \interface WCCPv2_Protocol * Sect 5.6.1 Security Info Component * @@ -191,7 +185,6 @@ struct wccp2_service_info_t { #define WCCP2_SERVICE_SRC_PORT_ALT_HASH 0x400 #define WCCP2_SERVICE_DST_PORT_ALT_HASH 0x800 - /* TODO the following structures need to be re-defined for correct full operation. wccp2_cache_identity_element needs to be merged as a sub-struct of wccp2_identity_info_t (identity_type); which frees up the identifty info @@ -237,7 +230,6 @@ struct wccp2_mask_element_t { uint32_t number_values; }; - /** \interface WCCPv2_Protocol * Sect 5.7.2 Web-Cache Identity Element */ @@ -349,8 +341,6 @@ static struct wccp2_capability_element_t wccp2_capability_element; #define WCCP2_PACKET_RETURN_METHOD_GRE WCCP2_METHOD_GRE #define WCCP2_PACKET_RETURN_METHOD_L2 WCCP2_METHOD_L2 - - /** \interface WCCPv2_Protocol * 5.7.8 Value Element */ @@ -627,7 +617,6 @@ wccp2_update_md5_security(char *password, char *ptr, char *packet, int len) return 1; } - /* * Check the given WCCP2 packet against the given password. */ @@ -680,7 +669,6 @@ wccp2_check_security(struct wccp2_service_list_t *srv, char *security, char *pac return (memcmp(md5_digest, md5_challenge, 16) == 0); } - void wccp2Init(void) { @@ -2006,7 +1994,6 @@ wccp2AssignBuckets(void *voidnotused) } } - /* * Configuration option parsing code */ diff --git a/src/win32.cc b/src/win32.cc index 1b18c8ed94..6a80b6e920 100644 --- a/src/win32.cc +++ b/src/win32.cc @@ -49,7 +49,6 @@ SQUIDCEXTERN LPCRITICAL_SECTION dbg_mutex; void WIN32_ExceptionHandlerCleanup(void); static LPTOP_LEVEL_EXCEPTION_FILTER Win32_Old_ExceptionHandler = NULL; - int WIN32_pipe(int handles[2]) { int new_socket; @@ -195,7 +194,6 @@ LONG CALLBACK WIN32_ExceptionHandler(EXCEPTION_POINTERS* ep) return EXCEPTION_CONTINUE_SEARCH; } - void WIN32_ExceptionHandlerInit() { #if !defined(_DEBUG) diff --git a/test-suite/hash.c b/test-suite/hash.c index e11d118e95..07e95b48a6 100644 --- a/test-suite/hash.c +++ b/test-suite/hash.c @@ -347,7 +347,6 @@ hash_get_bucket(hash_table * hid, unsigned int bucket) return (hid->buckets[bucket]); } - void hashFreeMemory(hash_table * hid) { @@ -357,7 +356,6 @@ hashFreeMemory(hash_table * hid) free(hid); } - #if USE_HASH_DRIVER /* * hash-driver - Run with a big file as stdin to insert each line into the @@ -411,7 +409,6 @@ main(void) } printf("done walking hash table...\n"); - printf("driver finished.\n"); exit(0); } diff --git a/test-suite/pconn-banger.c b/test-suite/pconn-banger.c index 7dbf65c5cc..aed8172210 100644 --- a/test-suite/pconn-banger.c +++ b/test-suite/pconn-banger.c @@ -95,7 +95,6 @@ time_t *t; return buf; } - char * mime_headers_end(const char *mime) { diff --git a/test-suite/tcp-banger2.c b/test-suite/tcp-banger2.c index 63d0094f09..b15eea4244 100644 --- a/test-suite/tcp-banger2.c +++ b/test-suite/tcp-banger2.c @@ -126,7 +126,6 @@ struct _f FD[SQUID_MAXFD]; int nfds = 0; int maxfd = 0; - static void free_request(struct _request *r) { diff --git a/test-suite/tcp-banger3.c b/test-suite/tcp-banger3.c index 33c69a5e29..1fec98e47a 100644 --- a/test-suite/tcp-banger3.c +++ b/test-suite/tcp-banger3.c @@ -368,7 +368,6 @@ sig_child(int sig) signal(sig, sig_child); } - int main(int argc, char *argv[]) { diff --git a/tools/cachemgr.cc b/tools/cachemgr.cc index 020103f3ec..e0c1a8fdda 100644 --- a/tools/cachemgr.cc +++ b/tools/cachemgr.cc @@ -119,7 +119,6 @@ extern "C" { } #endif - #ifndef DEFAULT_CACHEMGR_CONFIG #define DEFAULT_CACHEMGR_CONFIG "/etc/squid/cachemgr.conf" #endif @@ -325,7 +324,6 @@ auth_html(const char *host, int port, const char *user_name) printf("\n"); - if (fp != NULL) { int servers = 0; char config_line[BUFSIZ]; @@ -1068,7 +1066,6 @@ read_request(void) return req; } - /* Routines to support authentication */ /* diff --git a/tools/purge/socket.cc b/tools/purge/socket.cc index 20bac0a796..97cf57f1a2 100644 --- a/tools/purge/socket.cc +++ b/tools/purge/socket.cc @@ -120,7 +120,6 @@ setSocketNoDelay( int sockfd, bool nodelay ) return 0; } - int commonCode( int& sockfd, bool nodelay, int sendBufferSize, int recvBufferSize ) // purpose: common code in server sockets and client sockets diff --git a/tools/squidclient.cc b/tools/squidclient.cc index f75dceb4e4..befc742a6a 100644 --- a/tools/squidclient.cc +++ b/tools/squidclient.cc @@ -134,7 +134,6 @@ static void set_our_signal(void); static ssize_t myread(int fd, void *buf, size_t len); static ssize_t mywrite(int fd, void *buf, size_t len); - #if HAVE_GSSAPI static int check_gss_err(OM_uint32 major_status, OM_uint32 minor_status, const char *function); static char *GSSAPI_token(const char *server);