GNOME Bugzilla – Bug 313741
cleaning some code
Last modified: 2018-06-29 20:53:25 UTC
Version details: g2 Distribution/Version: Debian x86/32 gentoo/ppc64 since bug#302600, some %lld were not replaced because it compiles fine anyway. It is better to have coherency in variable and format type, so I replace the remaining one. See the following patch and notes
Created attachment 50865 [details] [review] fixes some incoherency NOTES: * gnc-ui-util.c * builder.c * sixtp-dom-generators.c * test-string-converters.c * postgres/checkpoint.c * gncquery.c * kvp-sql.c * kvp_frame.c * test-numeric.c * qofsql.c * TransLog.c all vars are gint64 ->replaced %lld by G_GINT64_FORMAT and removed unnecessary long long int' cast * test-date-converting.c * test-dom-converters1.c * test-date.c * %lld for casted tv_sec vars ->No change * putil.h #define COMP_INT64(sqlname,fun,ndiffs) Macro using %lld, but not used ->No change, dead code * gnc-numeric.c use long long int for local variable instead gint64 ->replaced longlongint by gint64 and lld by G_GINT64_FORMAT and replaced GNC_SCANF_LLD by G_GINT64_FORMAT /!\ should we remove GNC_SCANF_LLD ?? * qofquerycore.c type incoherency -> replaced GNC_SCANF_LLD by G_GINT64_FORMAT * gnc-log-replay.c dead code commented -> no change * qofmath128.c some lld used instead of llu -> replacement of lld/llu along vars type I didn't check but I think there is mixed (un)signed * qofquery-serialize.c in macro PUT_INT64 : replaced %lld by G_GINT64_FORMAT * god-drawing-renderer-gdk.c -> defined format for go_unit_t silly change because lines containing %lld are commented
This patch is missing a bunch of '%' characters in the print strings. It's also clearly missing some quotes... I don't think it would compile or work properly if applied. Also, in the future, could you please use full tree-paths for the file-changed comments? e.g., where in the source tree is god-drawing-renderer-gdk.c?
Created attachment 50873 [details] Notes with full path
Created attachment 50875 [details] [review] precedent patch were bogus, new one is here I have read an reread and reread precedent patch, corrected it. I can't see anything now, it compiles (but I'm not confident in this step now ;)
Created attachment 50877 [details] Compilation warnings on ppc64 It is the result of 'make 2> gnucash2.ppc64.stderr.make.log' It shows some interesting warnings which couldn't pass the --enable-error-on-warning
w.r.t. Comment #5, I'm not at all surprised that the PostgresBackend throws errors. I'm also not surprised there are problems in GoG.. Those appear to be the only places with problems. Feel free to send in a patch to correct them, but I'd recommend starting a new bug report. The patch in Comment #4 looks good. I'll try to apply it soon unless someone else gets to it first.
Patch applied to g2 CVS. Thanks.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=313741. Please update any external references or bookmarks.