www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/21/08:57:54

From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
Organization: Materials Science Centre
To: DJGPP AT DELORIE DOT COM
Date: Thu, 21 Nov 1996 13:19:08 GMT
Subject: v2 unwanted warnings
Message-ID: <EF21E372FE@fs2.mt.umist.ac.uk>

  Please reply to me also in person, as I had to unsubscribe from djgpp email
group due to email intray overload. I am sorry to keep troubling you.

  (0) About how many messages are there per day now on djgpp email group?

  I have just had my first go with v2, which I downloaded from Hensa at
Lancaster (England) today. I have a big program (a text editor), which v1 has
compiled many times under -Wall without complaint, but under v2 with -Wall:-

  (1) It has many functions all of type void name(val N,val T1,val T2){...}.
(val is an 8-byte class type which I declared). These functions MUST be all
the same type, as their addresses are used as values. But some of these
functions don't use some of their parameters. As a result the fault output
is stuffed out with hundreds of `warning: unused parameter' warning lines.
How to stop these warning and still use -Wall for its other useful properties?

  (2) Can this warning be suppressed specifically, similarly?:-
    `warning: suggest parentheses around assignment used as truth value'

  (3) This declaration at root level:-
char**dispmode[]={
(char*[]){" tab shown as one char",
	  " tab obeyed",
	  " tab shown and obeyed",0},
(char*[]){" going off end of line goes to next line",
	  " going off end of line appends spaces to line",0},
(char*[]){" typed char inserted",
	  " typed char overlays, cursor moves",
	  " typed char overlays, cursor stays still",0},
(char*[]){" no auto newline on typing long text lines",
	  " auto newline on typing long text lines",0},
(char*[]){" in search, ignore case of letters unless search string is magic",
	  " in search, don't ignore case of letters",0},
(char*[]){" horiz scroll to show cursor in long lines",
	  " display long lines folded",0},
(char*[]){" don't skip nonword chars after skipping word",
	  " nonword chars belong to word to left",
	  " nonword chars belong to word to right",
	  " skip nonword chars after skipping word",0},0};

  always compiled OK under v1, but v2 on seeing it blasphemes thus:-
keyf.cc:400: warning: braces around scalar initializer for `char **'
keyf.cc:400: warning: ignoring extra initializers for `char **'
keyf.cc:400: initialization to `char **' from `char *'
keyf.cc:400: warning: braces around scalar initializer for `char **'
keyf.cc:400: warning: ignoring extra initializers for `char **'
keyf.cc:400: initialization to `char **' from `char *'
keyf.cc:400: warning: braces around scalar initializer for `char **'
keyf.cc:400: warning: ignoring extra initializers for `char **'
keyf.cc:400: initialization to `char **' from `char *'
keyf.cc:400: warning: braces around scalar initializer for `char **'
keyf.cc:400: warning: ignoring extra initializers for `char **'
keyf.cc:400: initialization to `char **' from `char *'
keyf.cc:400: warning: braces around scalar initializer for `char **'
keyf.cc:400: warning: ignoring extra initializers for `char **'
keyf.cc:400: initialization to `char **' from `char *'
keyf.cc:400: warning: braces around scalar initializer for `char **'
keyf.cc:400: warning: ignoring extra initializers for `char **'
keyf.cc:400: initialization to `char **' from `char *'
keyf.cc:400: warning: braces around scalar initializer for `char **'
keyf.cc:400: warning: ignoring extra initializers for `char **'
keyf.cc:400: initialization to `char **' from `char *'

- Raw text -


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