Subject: Re: Signs of the Apocalypse

From: Dominik Vogt <[email-masked]>
Date: Fri, 15 Jan 1999 17:01:56 +0100

On Fri, Jan 15, 1999 at 10:39:10AM -0500, Steve Robins wrote:
> Hi,
> 
> If any of you are considering code hacking this weekend, can I implore you
> to watch the signs, please!
> 
> Prodded by Mark Manning, I have been running test builds on SGI systems
> (5.3 and 6.5) with gcc and with the vendor compilers.
> 
> There are *lots* of warnings generated.
> 
> One of the biggest classes of warnings are signed/unsigned issues.
> 
> (2) unsigned int * - lots of the X calls (XGetGeometry, for example) use
> 	**unsigned** int pointers to return height & width values.  However, lots
> of places in the code blithely pass regular ints.  I know, I know, this is
> horribly pedantic of me, but I like to see things compile without
> warnings.  Can we be a bit more careful of parameter types, please?

I've noticed myself a while ago. A big problem with the
signed/unsigned stuff is that it's everywhere in the code.
Cleaning up the warnings we have will invariably create
lots of other warnings elsewhere. Often you have no chance
tho choose the type of a variable without creating a
warning somewhere and thus you use int as the default most
often. I've no idea how to avoid this.

Bye

Dominik

-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Chris Rankin <[email-masked]>
Date: Fri, 15 Jan 1999 18:48:53 -0500 (EST)

> often. I've no idea how to avoid this.

I had an attempt to sort some of the signed/unsigned stuff out in
2.1.4 - the impact was far too great to submit though (>>200 lines!!).
However, you can solve some warnings (but by no means all, admittedly)
by making "height" and "width" fields "unsigned" in various structs,
since height and width arguments to X functions tend to be
"unsigned". Practically everything is declared as "int" at the moment.

Chris.