Re: compiler prob
- From: Martin Muellenberg <MartinMue gmx net>
- To: Allin Cottrell <cottrell wfu edu>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: compiler prob
- Date: Thu, 18 Jul 2002 13:39:43 +0200 (MEST)
On Thu, 18 Jul 2002, Martin Muellenberg wrote:
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -Wall
-I/usr/lib/ViaVoice/include
`pkg-config --cflags gtk+-2.0` -c gtkdateiname.c
gtkdateiname.c: In function `dateiname_ok':
gtkdateiname.c:57: warning: assignment discards qualifiers from pointer
target
type
static
void dateiname_ok(GtkWidget *widget, FILEDATEN *fdaten)
{
gchar *ausgewaehlt;
ausgewaehlt = gtk_file_selection_get_filename(
GTK_FILE_SELECTION(fdaten->gewaehlt)); /* THIS IS LINE 57 */
if (strlen (ausgewaehlt) < fdaten->laenge)
strcpy (fdaten->dateiname, ausgewaehlt);
gtk_widget_destroy(fdaten->gewaehlt);
gtk_main_quit();
}
The return from gtk_file_selection_get_filename is a const *gchar.
So you should replace the declaration
gchar *ausgewaehlt;
with
const gchar *ausgewaehlt;
(You are implicitly discarding the "const" qualifier by assigning the
filename returned by the file selection dialog to a plain *gchar
variable. You're not allowed to modify ausgewaehlt.)
Allin Cottrell.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Hi Allin
Thanks for help...
bye marmll
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]