Warning fixes
Pavel Roskin
proski at gnu.org
Sat Jun 16 00:57:53 UTC 2001
Hello!
I have fixed almost all warnings produces by gcc 3.0 prerelease on RedHat
Linux 7.1 with -Wall.
It appears that further cleanup in the headers is needed. Several
functions are declared more than once. We have several obscure headers not
tied to a particular file, such as tty.h, global.h, x.h, i18n.h. There was
also xtty.h, but I have already eliminated it. I see no benefit in keeping
those headers separate.
One (at least) bug has been fixed in process - closing the save dialog in
the GTK version of mcedit using window manager would cause GMC to crash.
Also a few minor errors, such as typos in error messages have been fixed.
I have found a lot of incomplete function declarations, i.e. `void' was
omitted in the parameter list. Most of them have been fixed.
Some functions without declarations in the headers have become static.
Some of them have been immediately identified as unused in GMC and
disabled if HAVE_X is defined. I don't bother distinguishing between
HAVE_X and HAVE_GNOME - there will be no other X frontends.
The remaining warnings may indicate other bugs and will be investigated.
Here's the list of the remaining warnings:
FileManager-skels.c:100: warning: const qualifier ignored on asm
FileManager-skels.c:190: warning: const qualifier ignored on asm
FileManager-skels.c:251: warning: const qualifier ignored on asm
FileManager-skels.c:327: warning: const qualifier ignored on asm
FileManager-stubs.c:22: warning: const qualifier ignored on asm
FileManager-stubs.c:902: warning: const qualifier ignored on asm
cpio.c:261: warning: const qualifier ignored on asm
All the above is from byte-swapping macros in glib. Doesn't show up in
older gcc.
edit.c:2577: warning: `%c' yields only last 2 digits of year in some locales
I've committed a workaround, but it only works with older versions of gcc.
I have also reported it as a bug in gcc:
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3190&database=gcc
gdesktop-prefs.c:82: warning: `x' might be used uninitialized in this function
gdesktop-prefs.c:82: warning: `y' might be used uninitialized in this function
gdialogs.c:549: warning: `fmd_win' might be used uninitialized in this function
gdnd.c:537: warning: `on_directory' might be used uninitialized in this function
gdnd.c:538: warning: `on_exe' might be used uninitialized in this function
gscreen.c:1856: warning: `old_y' might be used uninitialized in this function
gscreen.c:699: warning: `file' might be used uninitialized in this function
gscreen.c:700: warning: `fe' might be used uninitialized in this function
Probably harmless, but should be analyzed.
hotlist.c:691: warning: `current' might be used uninitialized in this function
Probably related to the crash on "Ctrl-X h <Enter>". Should be fixed.
Please don't commit any code that adds new warnings! They are much more
visible now and will be caught very soon!
Please report any regressions and compilation problems. I'm specifically
interested in compile errors on Windows (Cygwin) because it's often asked
on the list. Also I would like to see reports (positive or negative) about
compiling MC on commercial UNIX systems. All those reports should go to
the list, not to my personal address.
If you have problems compiling MC from CVS please report it _and_ try
snapshots on http://www.red-bean.com/~proski/ that are produced by "make
dist" and should _not_ require any GNU software (Autoconf, Automake,
gettext) to compile.
MC is known not to work on BeOS because of the limitations of the select()
call. The PC (OS/2 and Win32) port not using configure is also known to be
broken. Everything else should work.
--
Regards,
Pavel Roskin
More information about the mc-devel
mailing list