gnucash master: Multiple changes pushed

John Ralls jralls at ceridwen.us
Thu Jul 3 14:07:46 EDT 2014


On Jul 3, 2014, at 7:25 PM, Geert Janssens <janssens-geert at telenet.be> wrote:

>  
> I have fixed these as they were fairly trivial. clang next chokes in gnc-tree-view-split-reg.c:
>  
> /kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/gnome-utils/gnc-tree-view-split-reg.c:5309:33: error: expression which evaluates to zero treated as a null pointer constant of type 'const gchar *' (aka 'const char *')
>       [-Werror,-Wnon-literal-null-conversion]
>             result  = g_strdup (TXN_TYPE_NONE);
>                                 ^~~~~~~~~~~~~
> /kobaltnet/janssege/Development/EclipseGnuCash/GnuCash-git/src/engine/Transaction.h:119:24: note: expanded from macro 'TXN_TYPE_NONE'
> #define TXN_TYPE_NONE    '\0' /**< No transaction type       */
>                          ^~~~
> 1 error generated.
> make[5]: *** [gnc-tree-view-split-reg.lo] Error 1
> make[5]: Leaving directory `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/gnome-utils'
> make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/gnome-utils'
> make[3]: *** [all] Error 2
> make[3]: Leaving directory `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src/gnome-utils'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/kobaltnet/janssege/Development/Builds/gnucash-f20-master/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/kobaltnet/janssege/Development/Builds/gnucash-f20-master'
> make: *** [all] Error 2
>  
>  
> Same issue but this time it may need some more careful testing. TXN_TYPE_NONE may be used in other locations where '\0' is assumed instead of NULL (guile comes to mind). I don't have time to go deeper into this right now so I'll just revert back to gcc for the time being.
>  
> John, you don't *have* to fix this while you're on holidays :). There is an easy alternative and you can revisit it later if you like.
>  
> Oh, just a side question: do we want maint to be buildable with clang as well ? If so we may need to backport (cherry-pick) the current round of fixes.
>  
> 

Maybe you should just add -Wno-non-literal-null-conversion to CFLAGS. Copy the code I wrote yesterday for -Wno-deprecated-register without the AC_LANG([C++]) block.

I hadn't thought about maint. Up to now everything has been related to C++, which doesn't apply to maint. Let's try to remember to look at that again in August when we're both back from holiday. I'll need to get serious about OSX 10.10 testing then, too, and it has a more current version of Clang than I've been using so more of these issues might apply there as well.

Regards,
John Ralls




More information about the gnucash-devel mailing list