Mercurial > hg > xemacs-beta
comparison configure.ac @ 5016:2ade80e8c640
enable more warnings and fix them
-------------------- ChangeLog entries follow: --------------------
ChangeLog addition:
2010-02-08 Ben Wing <ben@xemacs.org>
* configure:
* configure.ac (TAB):
Various warnings that used to be present had mistakenly gotten
turned off. Turn them back on.
lwlib/ChangeLog addition:
2010-02-08 Ben Wing <ben@xemacs.org>
* xt-wrappers.h:
* xt-wrappers.h (Xt_SET_VALUE):
* xt-wrappers.h (Xt_GET_VALUE):
Rename var to avoid shadowing problems.
src/ChangeLog addition:
2010-02-08 Ben Wing <ben@xemacs.org>
* alloc.c:
Add prototypes for debugging functions.
* alloc.c (compact_string_chars): Make static.
* console-x.c (x_initially_selected_for_input):
* console-x.h:
* console-x.h (X_ERROR_OCCURRED):
Delete x_has_keysym() prototype from console-x.c, move to console-x.h.
* eval.c (multiple_value_call):
Real bug: Fix shadowing local vars.
* event-unixoid.c (read_event_from_tty_or_stream_desc):
* event-unixoid.c (signal_fake_event):
* lread.c (check_if_suppressed):
* strftime.c (strftime):
Fix stupid global shadowing warnings.
* event-unixoid.c (signal_fake_event):
* event-unixoid.c (drain_signal_event_pipe):
Use Rawbyte, not char.
* frame.h: Remove old prototype.
* gc.c:
* gc.c (show_gc_cursor_and_message):
* gc.c (remove_gc_cursor_and_message):
* gc.c (gc_prepare):
* gc.c (gc_finish_mark):
* gc.c (gc_finalize):
* gc.c (gc_sweep):
* gc.c (gc_finish):
* gc.c (gc_suspend_mark_phase):
* gc.c (gc_resume_mark_phase):
* gc.c (gc_mark):
* gc.c (gc_resume_mark):
Make fns static.
* glyphs-eimage.c (gif_decode_error_string):
Fix non-prototype.
* lisp.h:
Hack around global shadowing warnings involving `index'.
* intl-win32.c (wcsncpy):
* number-gmp.c (bigfloat_to_string):
* objects-msw.c (mswindows_font_spec_matches_charset_stage_2):
* specifier.c (call_charset_predicate):
* specifier.c (DEFINE_SPECIFIER_TAG_FROB):
Declarations cannot follow statements in standard C.
* search.c (search_buffer): Fix local shadowing warnings.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Mon, 08 Feb 2010 21:28:57 -0600 |
parents | 97c45e3ad810 |
children | 6f2158fa75ed 861f2601a38b |
comparison
equal
deleted
inserted
replaced
5015:d95c102a96d3 | 5016:2ade80e8c640 |
---|---|
2051 test "$__GCC" -ge 3 && with_cflags_warning="$with_cflags_warning -Wpacked" | 2051 test "$__GCC" -ge 3 && with_cflags_warning="$with_cflags_warning -Wpacked" |
2052 dnl glibc is intentionally not `-Wpointer-arith'-clean. | 2052 dnl glibc is intentionally not `-Wpointer-arith'-clean. |
2053 dnl Ulrich Drepper has rejected patches to fix the glibc header files. | 2053 dnl Ulrich Drepper has rejected patches to fix the glibc header files. |
2054 test "$have_glibc" != "yes" && \ | 2054 test "$have_glibc" != "yes" && \ |
2055 with_cflags_warning="$with_cflags_warning -Wpointer-arith" | 2055 with_cflags_warning="$with_cflags_warning -Wpointer-arith" |
2056 dnl | |
2056 dnl Warning flags that may differ for gcc and g++ (xemacs_compiler) | 2057 dnl Warning flags that may differ for gcc and g++ (xemacs_compiler) |
2058 dnl | |
2057 dnl With g++, -Wshadow produces five zillion utterly random warnings -- | 2059 dnl With g++, -Wshadow produces five zillion utterly random warnings -- |
2058 dnl a local var named `buffer' conflicts with `struct buffer' for | 2060 dnl a local var named `buffer' conflicts with `struct buffer' for |
2059 dnl example. Even with gcc, -Wshadow is questionable because of its | 2061 dnl example. Even with gcc, -Wshadow is questionable because of its |
2060 dnl complaints about parameters with the same names as global functions. | 2062 dnl complaints about parameters with the same names as global functions. |
2061 dnl There is no -Wmissing-declarations under g++. | 2063 dnl There is no -Wmissing-declarations, -Wmissing-prototypes, or |
2064 dnl -Wstrict-prototypes under g++. | |
2062 dnl But gcc warns about -Weffc++ in C compiles. | 2065 dnl But gcc warns about -Weffc++ in C compiles. |
2066 dnl | |
2067 dnl with_cflags_warning_c is for C-only warnings. | |
2068 dnl with_cflags_warning_cxx is for C++-only warnings. | |
2069 dnl with_cflags_warning_c_xe is for C-only warnings and only when | |
2070 dnl compiling the source tree (i.e. when --xemacs-compiler is used). | |
2071 with_cflags_warning_c="-Wshadow -Wmissing-declarations" | |
2072 with_cflags_warning_c="$with_cflags_warning_c -Wmissing-prototypes -Wstrict-prototypes" | |
2073 with_cflags_warning_cxx="-Weffc++" | |
2074 with_cflags_warning_c_xe="" | |
2075 dnl -Wunused-parameter only appeared in gcc 3. | |
2076 dnl -Wdeclaration-after-statement only appeared in gcc 3.4, and is C-only. | |
2077 dnl -Wunused-parameter is too annoying for use in lib-src, partly because | |
2078 dnl the UNUSED() decl is in compiler.h and we don't include that in any | |
2079 dnl of the lib-src files. | |
2063 dnl With g++, there is no effective way to use -Wunused-parameter without | 2080 dnl With g++, there is no effective way to use -Wunused-parameter without |
2064 dnl some very ugly code changes. | 2081 dnl some very ugly code changes. |
2065 if test "$XEMACS_CC_GPP" = "yes"; then | 2082 if test "$__GCC" -ge 3; then |
2066 xe_cflags_warning="$with_cflags_warning -Weffc++" | 2083 with_cflags_warning_c_xe="$with_cflags_warning_c_xe -Wunused-parameter" |
2067 elif test "$__GCC" -ge 3; then | |
2068 xe_cflags_warning="$with_cflags_warning -Wunused-parameter" | |
2069 if test "$__GCC" -gt 3 || test "$__GCC_MINOR" -ge 4; then | 2084 if test "$__GCC" -gt 3 || test "$__GCC_MINOR" -ge 4; then |
2070 with_cflags_warning="$with_cflags_warning -Wdeclaration-after-statement" | 2085 with_cflags_warning_c="$with_cflags_warning_c -Wdeclaration-after-statement" |
2071 fi | 2086 fi |
2072 fi | 2087 fi |
2073 with_cflags_warning="$with_cflags_warning -Wshadow -Wmissing-declarations" | 2088 dnl **** If more gcc/g++ flags are added, add them above, not below |
2074 with_cflags_warning="$with_cflags_warning -Wmissing-prototypes -Wstrict-prototypes" | 2089 dnl |
2075 dnl **** If more gcc/g++ flags are added, from here on must handle | 2090 dnl Now set warnings for the source tree (xe_cflags_warning) and for |
2076 dnl **** with_cflags_warning and xe_cflags_warning in parallel | 2091 dnl lib-src (with_cflags_warning). Note that if we didn't set |
2092 dnl xe_cflags_warning, it would automatically be initialized from | |
2093 dnl with_cflags_warning. | |
2094 if test "$XEMACS_CC_GPP" = "yes"; then | |
2095 xe_cflags_warning="$with_cflags_warning $with_cflags_warning_cxx" | |
2096 else | |
2097 xe_cflags_warning="$with_cflags_warning $with_cflags_warning_c $with_cflags_warning_c_xe" | |
2098 fi | |
2099 with_cflags_warning="$with_cflags_warning $with_cflags_warning_c" | |
2077 elif test "$__ICC" = "yes"; then | 2100 elif test "$__ICC" = "yes"; then |
2101 dnl This will apply to both source tree and lib-src | |
2078 with_cflags_warning="-Wall -w1 -we147" | 2102 with_cflags_warning="-Wall -w1 -we147" |
2079 dnl ### Add optimal with_cflags_warning support for other compilers HERE! | 2103 dnl ### Add optimal with_cflags_warning support for other compilers HERE! |
2080 fi | 2104 fi |
2081 fi | 2105 fi |
2082 test -z "$xe_cflags_warning" && xe_cflags_warning="$with_cflags_warning" | 2106 test -z "$xe_cflags_warning" && xe_cflags_warning="$with_cflags_warning" |