delorie.com/archives/browse.cgi | search |
From: | Ben Pfaff <pfaffben AT msu DOT edu> |
Newsgroups: | comp.lang.c,comp.os.msdos.djgpp |
Subject: | Re: what's this mean? |
Date: | 30 Nov 2000 11:30:55 -0500 |
Organization: | Michigan State University |
Lines: | 17 |
Sender: | blp AT pfaffben DOT user DOT msu DOT edu |
Message-ID: | <874s0pmngg.fsf@pfaffben.user.msu.edu> |
References: | <3a267c5f DOT 0 AT news DOT syr DOT edu> |
NNTP-Posting-Host: | pfaffben.user.msu.edu |
Mime-Version: | 1.0 |
X-AUTHid: | pfaffben |
User-Agent: | Chaos/1.13.1 EMY/1.13.9 (Art is long, life is short) FLIM/1.14.0 (Ninokuchi) APEL/10.2 Emacs/20.7 (i386-debian-linux-gnu) MULE/4.0 (HANANOEN) |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
"Andrew Clark" <anclark AT syr DOT edu> writes: > bige.c:15: warning: passing arg 2 of 'mem_err' dicards qualifiers from > pointer target type > > line 15: > > mem_err("could not create %s\n", names_east[i]); > > where mem_err is a function taking 2 char *'s and returning void. > names_east is a static const char *[]. It means that you passed a const char * and the function expected a char *. If the function modifies its second argument, this could lead to it modifying a const object, which results in undefined behavior. If the function doesn't modify its second argument, then change the parameter to be of type const char *.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |