delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/23/09:15:59

From: gregorio AT jet DOT es (Grzegorz Adam Hankiewicz)
Newsgroups: comp.os.msdos.djgpp
Subject: The warning 'missing braces' is driving me crazy...
Date: Tue, 23 Dec 1997 13:52:44 GMT
Organization: Gogosoftware
Lines: 22
Message-ID: <349ede8a.25515152@news.jet.es>
NNTP-Posting-Host: infon248.jet.es
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello.

For some time i've compiled my programs without warning flags.
Now I compile with -Werror -Wall -W.

The point is that I can't recompile some old source. There, I make the
following definition/declaration/whateverisitsname :

char line[4][2] = {2,1,2,1,
		3,4,2,1};

The compiler points me to that line and says:

l.c(5) Warning:  missing braces around initializer for `line[0]'

I guess you can figure out my question. How do I avoid these 'missing
braces' warnings?
(and please, don't tell me to compile without warning switches, I
*KNOW* that works ;-)

- Grzegorz Adam Hankiewicz - gregorio AT jet DOT es - http://web.jet.es/gregorio
- Gogosoftware - http://web.jet.es/gregorio/gogosoftware

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019