Mail Archives: cygwin-developers/1998/04/08/13:48:26
> 1) Anyone know how to fix the following message followed by many more
> of the same?
Yes. Each struct or array which is statically initialized in C/C++
should have brackets around it. This includes nested structs and
arrays. For example:
static struct {
int vk;
char *val[4];
} keytable[] = {
{ VK_LEFT, { "\033[D", NULL, NULL, NULL } },
{ 0, { "", NULL, NULL, NULL } }
};
-----Original Message-----
From: Geoffrey Noer [mailto:noer AT cygnus DOT com]
Sent: Wednesday, April 08, 1998 5:42 AM
To: cygwin32-developers AT cygnus DOT com
Cc: noer AT cygnus DOT com
Subject: Committed some warnings-removing changes
I spent a couple more hours doing more winsup cleanup, this time
building with -Wall -Wshadow. I think I probably eliminated about 90%
of the warnings although some remain.
There are still a couple of stupid single-letter variables that need
to be renamed at some point (like s and u).
Here are a few remaining issues I have questions about:
1) Anyone know how to fix the following message followed by many more
of the same?
/home/noer/src/devo/comp-tools/devo/winsup/console.cc:1220: warning:
aggregate has a partly bracketed initializer
I understand what the warning means in this context -- we aren't
explicit enough about how the chars are assigned to the char[4]
element of the struct. But I'm not sure how to fix it other than by
stopping statically initializing the struct.
2) In tty.cc, gcc claims that class tty * ttyp is an unused
variable in fhandler_tty_slave::close(). What needs to change here,
if anything?
3) In exceptions.cc,
/home/noer/src/devo/comp-tools/devo/winsup/exceptions.cc: At top
level:
/home/noer/src/devo/comp-tools/devo/winsup/exceptions.cc:370: warning:
`unsigned int rethere' defined but not used
Is this really the case? Or is _rethere that's mentioned in the asm
section refering to the global rethere?
--
Geoffrey Noer
noer AT cygnus DOT com
- Raw text -