delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/27/04:11:49

From: "Bryan" <riot29 AT hotmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: "initialization to 'void *' from 'const char *' discards qualifier"
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Message-ID: <FeKX4.595$TZ2.40338@newsread1.prod.itd.earthlink.net>
Date: Sat, 27 May 2000 06:50:13 GMT
NNTP-Posting-Host: 63.14.195.154
X-Complaints-To: abuse AT earthlink DOT net
X-Trace: newsread1.prod.itd.earthlink.net 959410213 63.14.195.154 (Fri, 26 May 2000 23:50:13 PDT)
NNTP-Posting-Date: Fri, 26 May 2000 23:50:13 PDT
Organization: EarthLink Inc. -- http://www.EarthLink.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I'm working with the allegro GUI system and recieve this error message when
compiling with the C++ compiler:

"initialization to 'void *' from 'const char *' discards qualifier"

It places the line numbers for the errors at the end of each DIALOG array,
i.e. the following gets one:


DIALOG file_save_dialog[] =   {
   { d_shadow_box_proc, 80,   32,   300, 70,    255,  0,    0,       0,
0,   NULL,  NULL, NULL  },
   { d_box_proc,      92,    47,   272,  12,   255,  0,    0,       0,
0,   NULL,  NULL, NULL  },
   { d_edit_proc,     93,    49,   270,  12,   255,  0,    0,       0,
80,   0,    "Filename",       NULL, NULL  },
   { d_button_proc,    120,  70,   100,  18,   255,  0,    'o',  D_O_K,
0,   0,    "&Ok",     NULL, NULL  },
   { d_button_proc,    230,  70,   100,  18,   255,  0,    'c',  D_CLOSE,
0,   0,    "&Cancel",     NULL, NULL  },
   { NULL,              0,    0,    0,    0,    0,    0,    0,       0,
0,   0,     NULL }
   };

I would guess that some type of casting is required, but I can't figure out
where.  These errors are also accompanied by warnings stating "converting
NULL to non-pointer type".  Anyone know how I can get the GUI stuff to
compile right under C++?

Thanks


- Raw text -


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