compile error r18884

Geert Janssens janssens-geert at telenet.be
Wed Mar 10 10:57:17 EST 2010


On Wednesday 10 March 2010, Herbert Thoma wrote:
> Hi!
> 
> With latest trunk I get a complie error:
> 
> cc1: warnings being treated as errors
> gnc-main-window.c: In function ‘main_window_update_page_name’:
> gnc-main-window.c:1928: error: implicit declaration of function ‘g_strstr’
> gnc-main-window.c:1928: error: comparison between pointer and integer
> make[5]: *** [gnc-main-window.lo] Fehler 1
> make[5]: Leaving directory
>  `/home/tma/gnucash/gnucash_cvs/gnucash_work/src/gnome-utils' make[4]: ***
>  [all-recursive] Fehler 1
> make[4]: Leaving directory
>  `/home/tma/gnucash/gnucash_cvs/gnucash_work/src/gnome-utils'
> 
> It seems that my glib does not have g_strstr but only g_strstr_len
> 
> The following trivial patch seems to fix my problem:
> 
> Index: src/gnome-utils/gnc-main-window.c
> ===================================================================
> --- src/gnome-utils/gnc-main-window.c   (Revision 18884)
> +++ src/gnome-utils/gnc-main-window.c   (Arbeitskopie)
> @@ -1924,7 +1924,7 @@
>      /* Update Tooltip on notebook Tab */
>      main_window_find_tab_event(window, page, &event_box);
> 
> -    if (g_strstr(old_page_long_name,old_page_name) != NULL)
> +    if (g_strstr_len(old_page_long_name,-1,old_page_name) != NULL)
>      {
>          gchar *new_page_long_name;
>          gint string_position;
> 

Doh ! My mistake again... I didn't apply Tom Van Braeckel's patch properly.

I was convinced I even ran a build before committing, but obviously I didn't 
check for errors carefully enough.

I'll commit the fix in a few moments (after I have run and verified a build).

Geert


More information about the gnucash-devel mailing list