|
![](/i/fill.gif) |
On Mon, 23 Sep 2002 10:51:19 +0200, "Thorsten Froehlich" <tho### [at] trf de>
wrote:
>In article <28gtou4t56f843790s28f5r236q80k3boi@4ax.com> , ABX
><abx### [at] abx art pl> wrote:
>
> > warnings when -Wall setting is used with gcc
>
> Using all gcc warning is pointless.
But somehow I did it :-)
I have now warning-free version of sources. And now I can say what I changed -
warnings were mostly generated with additions/changes introduced in 3.5. Old
code from 3.1 and earlier versions did not cause warnings usually. I can say
nothing about (x)windows compilation. I did it only with pure dos/unix
compile.
> > 1. "aggregate has a partly bracketed initializer"
>
> No idea what it is complaining about. The code is perfectly legal.
It is array of structures with one element - array. It have to be "double
bracketed" (is this english correct ?). So instead of:
{ ".jpg", ".JPG", ".jpeg", ".JPEG" },
it should be:
{ { ".jpg", ".JPG", ".jpeg", ".JPEG" } },
> > 2. "multi-character character constant"
>
> These are nonsensical compiler warnings for perfectly legal and portable
> code as long as the platform being used has 32 bit or bigger ints.
It helped to add definition:
#define FOURCHARS_TO_INT(c1,c2,c3,c4) \
(((unsigned long) c1 << 24) | \
((unsigned long) c2 << 16) | \
((unsigned long) c3 << 8 ) | \
((unsigned long) c4 ))
I have additional question. Is this more correct or still valid if I replace
line 1756:
fprintf(file, "%.8x%.8x\n", h, l);
with line:
fprintf(file, "%.8lx%.8lx\n", h, l);
?
ABX
Post a reply to this message
|
![](/i/fill.gif) |