Re: Compiler error with g_string{_append}_printf
- From: "Brian J. Tarricone" <bjt23 cornell edu>
- To: gtk-app-devel-list gnome org
- Subject: Re: Compiler error with g_string{_append}_printf
- Date: Fri, 17 Dec 2004 01:36:17 -0800
David wrote:
I've come across something that has me baffled - it may be obvious, but
I've fooled with this and can't see what's wrong..
I get an error stating "void value not ignored as it ought to be" in the
g_string_append_printf line. From what I could gather on Google, this
usually happens when a void value (usually returned from a function) is
passed as a parameter to a function. In fact, in this case, they are ALL
constant string pointers.
[snip]
msg = g_string_append_printf (msg, " -- G09Dis V %s --\n\n%s\n%s", "2.0",
" A graphical front-end to \"os9disasm\"\n",
" This version is strictly BETA!!!");
there's the problem. g_string_append_printf() doesn't return anything.
it takes a GString as the first argument, and appends your
format+arguments to it. that's it. the "msg =" is unnecessary, and
that's what's causing the error.
-brian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]