After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 313741 - cleaning some code
cleaning some code
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: General
git-master
Other Linux
: Normal trivial
: ---
Assigned To: Chris Lyttle
Chris Lyttle
Depends on:
Blocks:
 
 
Reported: 2005-08-17 17:51 UTC by Frederic Leroy
Modified: 2018-06-29 20:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixes some incoherency (14.39 KB, patch)
2005-08-17 17:59 UTC, Frederic Leroy
none Details | Review
Notes with full path (1.55 KB, text/plain)
2005-08-17 20:45 UTC, Frederic Leroy
  Details
precedent patch were bogus, new one is here (14.40 KB, patch)
2005-08-17 21:14 UTC, Frederic Leroy
none Details | Review
Compilation warnings on ppc64 (10.84 KB, text/plain)
2005-08-17 21:23 UTC, Frederic Leroy
  Details

Description Frederic Leroy 2005-08-17 17:51:29 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
Comment 1 Frederic Leroy 2005-08-17 17:59:51 UTC
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
Comment 2 Derek Atkins 2005-08-17 18:23:54 UTC
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?
Comment 3 Frederic Leroy 2005-08-17 20:45:19 UTC
Created attachment 50873 [details]
Notes with full path
Comment 4 Frederic Leroy 2005-08-17 21:14:32 UTC
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
;)
Comment 5 Frederic Leroy 2005-08-17 21:23:20 UTC
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
Comment 6 Derek Atkins 2005-08-18 13:34:18 UTC
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.
Comment 7 Derek Atkins 2005-08-19 18:42:25 UTC
Patch applied to g2 CVS.  Thanks.
Comment 8 John Ralls 2018-06-29 20:53:25 UTC
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.