diff options
author | Guido van Rossum <guido@python.org> | 1998-04-10 22:27:42 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-04-10 22:27:42 (GMT) |
commit | 730806d3d9bd8c54466e4a864b2b1f94df4413d2 (patch) | |
tree | 95ef041ad6e66f6cfbee3b6f84de6542c2cd36a7 /Modules | |
parent | 1109fbca76d08bb2f11f2899580d2ab7dbe796fa (diff) | |
download | cpython-730806d3d9bd8c54466e4a864b2b1f94df4413d2.zip cpython-730806d3d9bd8c54466e4a864b2b1f94df4413d2.tar.gz cpython-730806d3d9bd8c54466e4a864b2b1f94df4413d2.tar.bz2 |
Make new gcc -Wall happy
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_tkinter.c | 2 | ||||
-rw-r--r-- | Modules/bsddbmodule.c | 6 | ||||
-rw-r--r-- | Modules/parsermodule.c | 6 | ||||
-rw-r--r-- | Modules/readline.c | 8 | ||||
-rw-r--r-- | Modules/regexpr.c | 15 | ||||
-rw-r--r-- | Modules/structmodule.c | 6 |
6 files changed, 29 insertions, 14 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index d06700d..d1da535 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -358,7 +358,7 @@ Tkapp_New(screenName, baseName, className, interactive) } strcpy(argv0, className); - if (isupper(argv0[0])) + if (isupper((int)(argv0[0]))) argv0[0] = tolower(argv0[0]); Tcl_SetVar(v->interp, "argv0", argv0, TCL_GLOBAL_ONLY); ckfree(argv0); diff --git a/Modules/bsddbmodule.c b/Modules/bsddbmodule.c index b3474c4..2f0d05d 100644 --- a/Modules/bsddbmodule.c +++ b/Modules/bsddbmodule.c @@ -433,7 +433,7 @@ bsddb_keys(dp, args) { PyObject *list, *item; DBT krec, drec; - char *data,buf[4096]; + char *data=NULL,buf[4096]; int status; int err; @@ -556,8 +556,8 @@ bsddb_seq(dp, args, sequence_request) { int status; DBT krec, drec; - char *kdata,kbuf[4096]; - char *ddata,dbuf[4096]; + char *kdata=NULL,kbuf[4096]; + char *ddata=NULL,dbuf[4096]; PyObject *result; if (!PyArg_NoArgs(args)) diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index c09cccc..57fbf48 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -1704,20 +1704,22 @@ validate_try(tree) res = (validate_numnodes(tree, 6, "try/finally") && validate_colon(CHILD(tree, 4)) && validate_suite(CHILD(tree, 5))); - else if (res) + else if (res) { if (nch == (pos + 3)) { res = ((strcmp(STR(CHILD(tree, pos)), "except") == 0) || (strcmp(STR(CHILD(tree, pos)), "else") == 0)); if (!res) err_string("Illegal trailing triple in try statement."); } - else if (nch == (pos + 6)) + else if (nch == (pos + 6)) { res = (validate_name(CHILD(tree, pos), "except") && validate_colon(CHILD(tree, pos + 1)) && validate_suite(CHILD(tree, pos + 2)) && validate_name(CHILD(tree, pos + 3), "else")); + } else res = validate_numnodes(tree, pos + 3, "try/except"); + } } return (res); diff --git a/Modules/readline.c b/Modules/readline.c index c74aee0..594732b 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -19,6 +19,14 @@ /* GNU readline definitions */ #include <readline/readline.h> /* You may need to add an -I option to Setup */ +extern int rl_parse_and_bind(); +extern int rl_read_init_file(); +extern int rl_insert_text(); +extern int rl_bind_key(); +extern int rl_bind_key_in_map(); +extern int rl_initialize(); +extern int add_history(); + /* Pointers needed from outside (but not declared in a header file). */ extern int (*PyOS_InputHook)(); extern char *(*PyOS_ReadlineFunctionPointer) Py_PROTO((char *)); diff --git a/Modules/regexpr.c b/Modules/regexpr.c index 64e199d..55b1dff 100644 --- a/Modules/regexpr.c +++ b/Modules/regexpr.c @@ -1271,11 +1271,12 @@ char *re_compile_pattern(regex, size, bufp) } case Rbol: { - if (!beginning_context) + if (!beginning_context) { if (regexp_context_indep_ops) goto op_error; else goto normal_char; + } opcode = Cbol; goto store_opcode; } @@ -1289,11 +1290,12 @@ char *re_compile_pattern(regex, size, bufp) ((regexp_syntax & RE_NO_BK_PARENS)? (regex[pos] == ')'): (pos+1 < size && regex[pos] == '\134' && - regex[pos+1] == ')')))) + regex[pos+1] == ')')))) { if (regexp_context_indep_ops) goto op_error; else goto normal_char; + } opcode = Ceol; goto store_opcode; /* NOTREACHED */ @@ -1301,11 +1303,12 @@ char *re_compile_pattern(regex, size, bufp) } case Roptional: { - if (beginning_context) + if (beginning_context) { if (regexp_context_indep_ops) goto op_error; else goto normal_char; + } if (CURRENT_LEVEL_START == pattern_offset) break; /* ignore empty patterns for ? */ ALLOC(3); @@ -1316,11 +1319,12 @@ char *re_compile_pattern(regex, size, bufp) case Rstar: case Rplus: { - if (beginning_context) + if (beginning_context) { if (regexp_context_indep_ops) goto op_error; else goto normal_char; + } if (CURRENT_LEVEL_START == pattern_offset) break; /* ignore empty patterns for + and * */ ALLOC(9); @@ -2061,11 +2065,12 @@ int re_search(bufp, else dir = 1; - if (anchor == 2) + if (anchor == 2) { if (pos != 0) return -1; else range = 0; + } for (; range >= 0; range--, pos += dir) { diff --git a/Modules/structmodule.c b/Modules/structmodule.c index 065ec6f..0cf996f 100644 --- a/Modules/structmodule.c +++ b/Modules/structmodule.c @@ -1008,7 +1008,7 @@ calcsize(fmt, f) s = fmt; size = 0; while ((c = *s++) != '\0') { - if (isspace(c)) + if (isspace((int)c)) continue; if ('0' <= c && c <= '9') { num = c - '0'; @@ -1110,7 +1110,7 @@ struct_pack(self, args) res = restart = PyString_AsString(result); while ((c = *s++) != '\0') { - if (isspace(c)) + if (isspace((int)c)) continue; if ('0' <= c && c <= '9') { num = c - '0'; @@ -1242,7 +1242,7 @@ struct_unpack(self, args) str = start; s = fmt; while ((c = *s++) != '\0') { - if (isspace(c)) + if (isspace((int)c)) continue; if ('0' <= c && c <= '9') { num = c - '0'; |