Subject: FVWM: Compiler warnings

From: Gregg Dameron <[email-masked]>
Date: Mon, 11 Mar 2002 18:55:54 -0700

The Solaris C compiler (acc) complains when building fvwm2.  In our shop
we tend to get nervous about such things, since we will be providing
systems (with fvwm2 installed) to our end users, and must answer to any
bug reports they submit.  (They have a real knack for exposing weird,
intermittent anomalies.)  As a result, we've developed a healthy respect
for compiler warnings.  What follows are the warnings from a build of
2.4.6.  Any plans to address these?

Gregg Dameron

"../config.h", line 91: warning: syntax error:  empty declaration
(or)
"../../config.h", line 91: warning: syntax error:  empty declaration
(many, many of these - these warnings are new since 2.4.5)

"FScreen.c", line 1005: warning: argument #4 is incompatible with
prototype:
        prototype: pointer to unsigned int : "FScreen.c", line 839
        argument : pointer to int
"FScreen.c", line 1005: warning: argument #5 is incompatible with
prototype:
        prototype: pointer to unsigned int : "FScreen.c", line 839
        argument : pointer to int

"menus.c", line 2772: warning: argument #5 is incompatible with
prototype:
        prototype: pointer to int : "../libs/FScreen.h", line 48
        argument : pointer to unsigned int
"menus.c", line 2772: warning: argument #6 is incompatible with
prototype:
        prototype: pointer to int : "../libs/FScreen.h", line 48
        argument : pointer to unsigned int
"menus.c", line 7629: warning: argument #5 is incompatible with
prototype:
        prototype: pointer to int : "../libs/FScreen.h", line 48
        argument : pointer to unsigned int
"menus.c", line 7629: warning: argument #6 is incompatible with
prototype:
        prototype: pointer to int : "../libs/FScreen.h", line 48
        argument : pointer to unsigned int
"menus.c", line 7675: warning: end-of-loop code not reached

"bindings.c", line 321: warning: statement not reached

"FvwmConsoleC.c", line 56: warning: argument #2 is incompatible with
prototype:
        prototype: pointer to function(int) returning void :
"/usr/include/signal.h", line 46
        argument : pointer to function() returning void
"FvwmConsoleC.c", line 57: warning: argument #2 is incompatible with
prototype:
        prototype: pointer to function(int) returning void :
"/usr/include/signal.h", line 46
        argument : pointer to function() returning void

"readconfig.c", line 1533: warning: enum type mismatch: op "="
"readconfig.c", line 1535: warning: enum type mismatch: op "="
"readconfig.c", line 1537: warning: enum type mismatch: op "="
"readconfig.c", line 1544: warning: enum type mismatch: op "="
"readconfig.c", line 1544: warning: enum type mismatch: op "="

"xmanager.c", line 1653: warning: statement not reached

"FvwmTheme.c", line 684: warning: argument #6 is incompatible with
prototype:
        prototype: pointer to unsigned int : "../../libs/fvwmlib.h",
line 342
        argument : pointer to int
"FvwmTheme.c", line 684: warning: argument #7 is incompatible with
prototype:
        prototype: pointer to unsigned int : "../../libs/fvwmlib.h",
line 342
        argument : pointer to int

"icons.c", line 278: warning: statement not reached
"icons.c", line 317: warning: statement not reached

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Walter Dnes <[email-masked]>
Date: Mon, 11 Mar 2002 23:21:18 -0500

On Mon, Mar 11, 2002 at 06:55:54PM -0700, Gregg Dameron wrote
> 2.4.6.  Any plans to address these?

  This issue also shows up with Mozilla, whose development newsgroups I
follow.  Short answer... Solaris' native compiler is *NOT* ansi standard.
Install a standard compiler like gcc.  That will solve not only fvwm2
compilation warnings/errors, but everything else that expects standard C.

-- 
Walter Dnes <[email-masked]>
Standards are so wonderful; everybody wants to have their own.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Gregg Dameron <[email-masked]>
Date: Tue, 12 Mar 2002 13:50:58 -0700

> compilation warnings/errors, but everything else that expects standard C.

Changing compilers doesn't address our concern.  In fact, using "gcc
-pedantic" produces warnings similar to acc's.  It comes down to this:  a
small number of fvwm2 source files have ANSI-related issues.  Perhaps all of
them are benign.  Perhaps none of them will ever show up as a runtime
anomaly.  But there's this nagging thought:  If the producers of acc and gcc
went to the trouble to warn us about something the ANSI C committee frowns
upon, isn't it prudent to pay attention?

---

From: Dan Espen <[email-masked]>
Date: Tue, 12 Mar 2002 16:54:55 -0500

> upon, isn't it prudent to pay attention?

We definitely pay attention to all the warnings that gcc produces.
(And fix them.)

I've tried to fix all the Solaris warnings in the past, but differences
in the Solaris X header files vs. other X implementations made that
impossible.

I looked at most of the warnings you reported and didn't see
anything that would cause a problem.  One of them
(code not reached) should be fixed, but it wouldn't cause
a problem, it was just some left over code.

I'm not sure what "acc" is though.  We have Sun's compiler
here, but I don't have anything named "acc" in my path.

-- 
Dan Espen                           E-mail: [email-masked]
444 Hoes Lane  Room RRC 1C-214      Phone: (732) 699-5570
Piscataway, NJ 08854
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 13 Mar 2002 00:22:36 +0100

> (many, many of these - these warnings are new since 2.4.5)

Forget these; generated by configure.

>         argument : pointer to int

Ignore any signed/unsigned warnings.  It's almost impossible to
fix these without breaking lots of code.

> "menus.c", line 7675: warning: end-of-loop code not reached

That's quite intentional.

> "bindings.c", line 321: warning: statement not reached

Nothing critical.  Should have been detected by compiling with
-Wall though.

>         argument : pointer to function() returning void

Nothing important, but I'll still fix it.

> "readconfig.c", line 1544: warning: enum type mismatch: op "="

Harmless but unnecessary.

> "xmanager.c", line 1653: warning: statement not reached

That warning is brain dead.  It says that the final "return" in
the function is not reached.  I'll still remove it.

>         argument : pointer to int

Ignore these.

> "icons.c", line 317: warning: statement not reached

There are two reasons why I don't compile with -pedantic:  First,
it's almost impossible to get all the signed/unsigned warnings
fixed.  Second, I could never find any bug in the code with that
option and it complains about a lot of useless stuff.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Gregg Dameron <[email-masked]>
Date: Tue, 12 Mar 2002 16:57:36 -0700

> here, but I don't have anything named "acc" in my path.

We bought Sun's Forte package (formerly Workshop).  On our server, it's
/opt/SUNWspro/WS6U1/bin/acc.  We have that directory PATH'd.  When it's
installed, "man cc" references /usr/ucb/cc, which is a script that wraps
/usr/ccs/bin/ucbcc, which is a symlink to /opt/SUNWspro/WS6U1/bin/acc.

---

From: Gregg Dameron <[email-masked]>
Date: Tue, 12 Mar 2002 17:07:24 -0700

> Forget these; generated by configure.

Ah, but did you notice the stray semicolon at the end of line 90 of
config.h.in?  That's where most of the compiler noise is coming from.  It
appeared between 2.4.5 and 2.4.6.

> option and it complains about a lot of useless stuff.

Understood.  Thank you for taking the time to respond to all these - it's
much appreciated.

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 13 Mar 2002 00:47:55 +0000

> appeared between 2.4.5 and 2.4.6.

Ok, this noisy warning that only appears in 2.4.6 will be fixed in 2.4.7.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 13 Mar 2002 11:15:29 +0100

> appeared between 2.4.5 and 2.4.6.

Er, no.  I can't find any stray semicolon.  How does the line look
like?

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dan Espen <[email-masked]>
Date: Wed, 13 Mar 2002 07:18:45 -0500

> Er, no.  I can't find any stray semicolon.  How does the line look

The extra semicolon was in acconfig.h (which creates config.h.in).
Its already fixed:

2002-03-13  Mikhael Goikhman  <[email-masked]>

	* acconfig.h:
	fixed an empty statement ";" warning with some compilers

---

From: Gregg Dameron <[email-masked]>
Date: Wed, 13 Mar 2002 09:40:59 -0700

Thanks to everyone for your attention to this matter.  If we could get half the
support from our other product vendors that we get from you, our jobs here would
be a lot easier.