Commit Graph

9 Commits

Author SHA1 Message Date
Richard Cohen
0798bce2a6 [-Wunused-value] - remove
borrowed/jenny/jenny.c: In function ‘next_builder’:
borrowed/jenny/jenny.c:1164:5: warning: statement with no effect [-Wunused-value]
 1164 |     for (i; i<n-1; ++i) {            /* reset all less significant positions */
      |     ^~~
borrowed/jenny/jenny.c:1172:5: warning: statement with no effect [-Wunused-value]
 1172 |     for (i; i<n-1; ++i) {            /* reset all less significant positions */
      |     ^~~
borrowed/jenny/jenny.c: In function ‘confirm’:
borrowed/jenny/jenny.c:1797:7: warning: statement with no effect [-Wunused-value]
 1797 |       for (i; i<n-1; ++i) {          /* reset all less significant positions */
      |       ^~~
borrowed/jenny/jenny.c:1805:7: warning: statement with no effect [-Wunused-value]
 1805 |       for (i; i<n-1; ++i) {          /* reset all less significant positions */
      |       ^~~

libgnucash/backend/xml/io-gncxml-v2.cpp: In function ‘gboolean qof_session_load_from_xml_file_v2_full(GncXmlBackend*, QofBook*, sixtp_push_handler, gpointer, QofBookFileType)’:
libgnucash/backend/xml/io-gncxml-v2.cpp:806:40: warning: value computed is not used [-Wunused-value]
  806 |                 g_thread_join (thread) != nullptr;
      |                 ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

libgnucash/engine/Account.cpp: In function ‘void xaccFreeAccount(Account*)’:
libgnucash/engine/Account.cpp:1428:17: warning: statement has no effect [-Wunused-value]
 1428 |     priv->color == nullptr;
      |     ~~~~~~~~~~~~^~~~~~~~~~
libgnucash/engine/Account.cpp:1429:22: warning: statement has no effect [-Wunused-value]
 1429 |     priv->sort_order == nullptr;
      |     ~~~~~~~~~~~~~~~~~^~~~~~~~~~
libgnucash/engine/Account.cpp:1430:17: warning: statement has no effect [-Wunused-value]
 1430 |     priv->notes == nullptr;
      |     ~~~~~~~~~~~~^~~~~~~~~~
libgnucash/engine/Account.cpp:1431:18: warning: statement has no effect [-Wunused-value]
 1431 |     priv->filter == nullptr;
      |     ~~~~~~~~~~~~~^~~~~~~~~~

libgnucash/engine/gnc-int128.cpp: In function ‘void decimal_from_binary(uint64_t*, uint64_t, uint64_t)’:
libgnucash/engine/gnc-int128.cpp:898:36: warning: right operand of comma operator has no effect [-Wunused-value]
  898 |     d[3] = (hi >> 32) & bin_mask, 0;
      |                                    ^
2023-02-16 09:19:19 +00:00
Richard Cohen
ea2d3be217 Remove some unused variables with obviously no side effects 2023-02-06 14:19:22 +00:00
John Ralls
046e4a156e Silence Clang deprecation warnings about sprintf. 2023-01-23 12:54:25 -08:00
Richard Cohen
1cec0cb3f3 Use internal extern "C" { ... } for C++
- removes warnings compiling swig engine
...
[ 10%] Generating swig-engine.cpp
.../libgnucash/engine/engine-helpers.h:31: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gnc-date.h:83: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/qofquery.h:90: Warning 302: Identifier 'QofQuery' redefined (ignored),
.../libgnucash/engine/gnc-option.hpp:55: Warning 302: previous definition of 'QofQuery'.
.../libgnucash/engine/gnc-commodity.h:56: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncBusiness.h:40: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncEntry.h:37: Warning 313: Unrecognized extern type "C++".
2023-01-23 18:40:01 +00:00
David Palma
aab89065da
Bug 796949 - Fix division and rounding of zero.
Fix division of 128-bit integers so that the remainder inherits the dividend's sign.
Fix rounding for truncated zero.
2019-05-11 23:23:59 +01:00
John Ralls
43a30e1c97 Silence clang static analyzer complaint about potential div by 0.
It can't, because if b is 0 the function would have
returned already; since b.m_hi is 0 b.m_lo can't be. The assert
reassures clang that this is the case.
2018-11-30 15:08:41 +09:00
John Ralls
3d1362757b Prevent potential undefined behavior by shifting by a wrapped uint.
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
Geert Janssens
1238b9d8cd Prevent gcc from searching config.h in the current directory
This will avoid a ninja-build from picking up a config.h generated by the autotools build
(in the root build directory). Picking up the wrong config.h may lead to all kinds of
subtle issues if the autotools run was done with different options than the cmake run.
2017-10-26 14:05:17 +02:00
Geert Janssens
83d14e1c1c Restructure the src directory
It is split into
- /libgnucash (for the non-gui bits)
- /gnucash (for the gui)
- /common (misc source files used by both)
- /bindings (currently only holds python bindings)

This is the first step in restructuring the code. It will need much
more fine tuning later on.
2017-08-10 18:45:00 +02:00