Re: gtk_main_quit () problem
- From: Andreas Volz <andreas brachttal net>
- To: nash nash nu
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gtk_main_quit () problem
- Date: Sun, 17 Nov 2002 12:55:48 +0000
Am Sun, 17 Nov 2002 08:27:42 +1100
Brett Nash <nash nash nu> schrieb:
I can see two blatent C errors, either of which could be causing you
bugs.
First do NOT ever pass a const char * to strtok as its first argument.
Casting does not stop it from being a const char *. You will need to
strdup the string first or use a non-destructive function like strspn.
Secondly 'gchar **parmv' is a pointer to pointer, not an array. In
particular parmv[parm_counter] = parm is undefined in its behaviour.
I noticed my mistake. Now with g_malloc, g_realloc and g_free it works
great. Thanks!
Note that my compiler generates a warnign on both of these errors, so
add some more warnings to compilation string, and makes sure you
understand what the compiler is complaining about.
I compiled it with -Wall -pedantic. This should report all errors.
Doesn't it?
Andreas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]