bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23771: Eliminating compiler warnings


From: Ken Brown
Subject: bug#23771: Eliminating compiler warnings
Date: Tue, 14 Jun 2016 22:04:28 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

I would like to get rid of all compiler warnings in the Cygwin builds (X11, w32, and nox). There are currently none in the X11 build, but there are a lot in the other builds. Many of the warnings in the w32 build probably occur in the MinGW build also. And all of the warnings in the nox build would occur in any build without a window system.

The seven patches attached attempt to eliminate all the currently existing warnings. There is one patch for each type of warning. Since they affect other platforms besides Cygwin, I won't install them until someone has had a chance to review them. There's obviously no rush about this.

Two comments: First, patch 0006-... is there because there might be a jump over an AUTO_STRING call. (This happens exactly once in the Cygwin-w32 build.) It seems stupid to have to worry about this. An alternative would be to just disable the -Wjump-misses-init warning.

Second, patch 0007-... is there because I couldn't think of a reasonable way to avoid -Waddress warnings when compiling w32fns.c, w32menu.c, and menu.c in the Cygwin-w32 build. Everything I thought of would have made the code very ugly. So I simply disabled that warning for the Cygwin-w32 build, and I took the liberty of doing the same thing for the MinGW build, which I think is also affected in some cases. If someone sees a better way of eliminating those warnings, that would be preferable.

Ken

Attachment: 0001-Eliminate-noreturn-warnings-if-there-s-no-window-sys.patch
Description: Text document

Attachment: 0002-Fix-unused-variable-compiler-warnings.patch
Description: Text document

Attachment: 0003-Avoid-empty-body-compiler-warnings.patch
Description: Text document

Attachment: 0004-Fix-format-compiler-warnings.patch
Description: Text document

Attachment: 0005-Don-t-define-unneeded-function-on-Cygwin.patch
Description: Text document

Attachment: 0006-Avoid-jump-misses-init-compiler-warnings.patch
Description: Text document

Attachment: 0007-Avoid-address-compiler-warnings.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]