From: Mark O'D. <mar...@lu...> - 2000-08-26 07:23:19
|
Here are some more changes for the "no effects" warning removals. in gpre/sqe.c From: if (conflict) { SCHAR *error_type; if (symbol->sym_type == SYM_relation) error_type == "table"; else if (symbol->sym_type == SYM_procedure) error_type == "procedure"; else error_type == "context"; Changed to: if (conflict) { SCHAR *error_type; if (symbol->sym_type == SYM_relation) error_type = "table"; else if (symbol->sym_type == SYM_procedure) error_type = "procedure"; else error_type = "context"; Another occurance of the == where a = was required. In burp/backup.e The following code occurs in two places: STUFF (name_len); for (; c = *name++, name_len--; name_len) STUFF (c); Obvioulsy the ; name_len) does nothing. Changed to: STUFF (name_len); for (; c = *name++, name_len--;) STUFF (c); That has to be a cute change one that results in a ;) in the code. Another in burp/backup.e for (rp = field->fld_ranges, n = field->fld_dimensions; *rp, n; rp+=2, n--) { PUT_NUMERIC (att_field_range_low, *rp); PUT_NUMERIC (att_field_range_high, *(rp+1)); } } Changed to: for (rp = field->fld_ranges, n = field->fld_dimensions; n; rp+=2, n--) ... See seperate email about this one for choice of n over *rp && n. In burp/burp.c for (p = redirect, string = OUTPUT_SUPPRESS, tdgbl->sw_redirect = NOOUTPUT; c = *p++; *string) { if (UPPER (c) != *string++) { tdgbl->sw_redirect = TRUE; break; } } Changed to: for (p = redirect, string = OUTPUT_SUPPRESS, tdgbl->sw_redirect = NOOUTPUT; c = *p++; ) Removed the *string from the for increment section, it look like someone moved the *string++ into the code but forgot to completely remove it from the for increment. In dudley/parse.c static FUNCARG parse_function_arg ( FUNC function, USHORT *position) { ... KEYWORD (KW_BY); LEX_token(); The KEYWORD macro expands to : #define KEYWORD(kw) (DDL_token.tok_keyword == kw) So it does nothing and generates a warning. I've commented it out for now, since it is the old gdml code, but the correct change may be to make it something based on: if (!KEYWORD(KW_BY)) { PARSE_error(....) } I'll wait for some feedback. In isql/isql.e void ISQL_warning ( STATUS *status) { ... status[2] == gds_arg_end; Changed to: status[2] = gds_arg_end; Which seems fairly clearly the intention. In qli/meta.e The statement length; doesn't add a lot of value in the function and generates a warning, I removed it. in: static SYM make_symbol ( TEXT *string, SSHORT length) { SYM symbol; TEXT *p, *end;; if (!(length = truncate_string (string))) return NULL; length; symbol = (SYM) ALLOCPV (type_sym, length); symbol->sym_type = SYM_relation; symbol->sym_length = length; symbol->sym_string = p = symbol->sym_name; do *p++ = *string++; while (--length); return symbol; } Ok Thats it no "no effects" warnings left (except the one in alice.c to follow up on). But tell you what I'll be pissed off if Inprise take just this and say "thanks sucker" just another free developer to add value to an Inprise product. Cheers Mark |