can't print string pointer, get error?



I have the following defined in my program:

gchar   *id;

I perform the following operation which fills id with appropriate
values:

gtk_tree_model_get(theModel, &custListIter, CUST_ID, &id, -1);

Then, I print out the value of id for debugging purposes:

g_printf("row number %s was retrieved\n", id);

but, upon compile, I receive the following error:

  callbacks.c:509: warning: char format, different type arg(arg 2)


Say what? Why am I getting this error? It doesn't make sense. You print
out string pointers using printf("%s", var) which works fine numer
normal C conditions. So why do I get this warning, and how do I fix it?

Thanks.

-- 
 .''`.      Carl B. Constantine
: :' :     duckwing duckwing ca
`. `'    GnuPG: 135F FC30 7A02 B0EB 61DB  34E3 3AF1 DC6C 9F7A 3FF8
  `-  Debian GNU/Linux -- The power of freedom
  "Claiming that your operating system is the best in the world because more
  people use it is like saying McDonalds makes the best food in the world."



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]