Compile warning when setting entry text



In my application, on a form, the first entry has to be calculated (next
available transaction number), but it has to be an entry because it can
eventually be modified by the user, defaulting to the calculated value.

Setting the default with

gtk_entry_set_text(GTK_ENTRY(entry), nextavailnumber() ); 

gives me the following warning at compile time:

passing arg 2 of `gtk_entry_set_text' makes pointer from integer without
a cast.

I have extern *nextavailnumber() defined returning a character from a
database.

I tried returning pointers instead of characters from the external
functions, the message is different, but there is still a warning.

The program works fine, no problem, but I'm not too comfortable with the
warning; besides the program is complex and I have about one hundred of
such warnings making debugging harder. Is there another way to set entry
text to a non constant (calculated) string?

Regards,

Henry





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