Re: gtk_tree_store_set



On Thursday 28 July 2005 11:41, The Saltydog wrote:

This is my code:

      gtk_tree_store_set(model,&firstiter,
                      0, "/", 1, "/",
                      3, (gfloat)((g_fs.used*100)/g_fs.total),
                      4, calc(g_fs.used),     5, g_fs.used,
                      7, -100,
                      -1);

It works fine on any i386/686 installation. On PowerPc and on amd, I
have a segfault reaching this instructions. 

So what GTypes are those columns, ie. what does your gtk_tree_store_new() line 
look like?

What type does your calc() function return? float? int? something else? 

What type is g_fs.used?

Notice that it compiles straight on every platform, and on i386 the
program works fine without any warning.

Unfortunately there is very little checking the compiler can do with vararg 
functions.

 Cheers
  -Tim



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