From: abx AT abx DOT art DOT pl (Wlodzimierz ABX Skiba) Newsgroups: comp.os.msdos.djgpp Subject: Re: cleaning source from warnings troubles Date: 28 Sep 2002 02:20:57 -0700 Organization: http://groups.google.com/ Lines: 28 Message-ID: References: NNTP-Posting-Host: 62.21.99.104 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1033204857 22431 127.0.0.1 (28 Sep 2002 09:20:57 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: 28 Sep 2002 09:20:57 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hans-Bernhard Broeker wrote in message news:... > > > > 1. "aggregate has a partly bracketed initializer" > > Hmm.. yes, on second look, I think I see what this is about. You have > a an array of structs, where the struct's only element is an array. > Strictly speaking that's two aggregates inside each other, so you > would need *two* pairs of {} per struct. Yes, this fix works fine. Thanks. But second fix ... > > Any other way to write this part as more portable code ? > > Yet another enum, or a special macro to take 4 chars and transform them > into an int, which I think the coders were assuming this code would do > for them: > > #define FOURCHARS_TO_INT(c1,c2,c3,c4) \ > (((unsigned long) c1 << 24) \ > || ((unsigned long) c2 << 16) \ > || ((unsigned long) c3 << 8) \ > || (unsigned long) c4) ... not works. Or rather works where it is applied - in enum there is no more warning. But in case statement where entries from enum are used there is error that tokens from enum have the same value. Any idea ? ABX