[-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;
      |                                    ^
This commit is contained in:
Richard Cohen 2023-01-28 17:33:06 +00:00
parent 9efbdc15cf
commit 0798bce2a6
4 changed files with 10 additions and 10 deletions

View File

@ -1161,7 +1161,7 @@ next_builder( state *s, feature *tuple, ub1 n)
return FALSE; return FALSE;
else if (tuple[i].f < s->dim[tuple[i].d]-1) { else if (tuple[i].f < s->dim[tuple[i].d]-1) {
++tuple[i].f; /* increment feature */ ++tuple[i].f; /* increment feature */
for (i; i<n-1; ++i) { /* reset all less significant positions */ for (; i<n-1; ++i) { /* reset all less significant positions */
tuple[i+1].d = tuple[i].d+1; tuple[i+1].d = tuple[i].d+1;
tuple[i+1].f = 0; tuple[i+1].f = 0;
} }
@ -1169,7 +1169,7 @@ next_builder( state *s, feature *tuple, ub1 n)
else { else {
++tuple[i].d; /* increment least significant non-maxed-out position */ ++tuple[i].d; /* increment least significant non-maxed-out position */
tuple[i].f = (ub2)0; /* reset its feature */ tuple[i].f = (ub2)0; /* reset its feature */
for (i; i<n-1; ++i) { /* reset all less significant positions */ for (; i<n-1; ++i) { /* reset all less significant positions */
tuple[i+1].d = tuple[i].d+1; tuple[i+1].d = tuple[i].d+1;
tuple[i+1].f = 0; tuple[i+1].f = 0;
} }
@ -1792,7 +1792,7 @@ confirm( state *s)
break; /* done */ break; /* done */
else if (offset[i].f < s->dim[offset[i].d]-1) { else if (offset[i].f < s->dim[offset[i].d]-1) {
++offset[i].f; /* increment feature */ ++offset[i].f; /* increment feature */
for (i; i<n-1; ++i) { /* reset all less significant positions */ for (; i<n-1; ++i) { /* reset all less significant positions */
offset[i+1].d = offset[i].d+1; offset[i+1].d = offset[i].d+1;
offset[i+1].f = 0; offset[i+1].f = 0;
} }
@ -1800,7 +1800,7 @@ confirm( state *s)
else { else {
++offset[i].d; /* increment least significant non-maxed-out position */ ++offset[i].d; /* increment least significant non-maxed-out position */
offset[i].f = (ub2)0; /* reset its feature */ offset[i].f = (ub2)0; /* reset its feature */
for (i; i<n-1; ++i) { /* reset all less significant positions */ for (; i<n-1; ++i) { /* reset all less significant positions */
offset[i+1].d = offset[i].d+1; offset[i+1].d = offset[i].d+1;
offset[i+1].f = 0; offset[i+1].f = 0;
} }

View File

@ -803,7 +803,7 @@ qof_session_load_from_xml_file_v2_full (
generic_callback, gd, book); generic_callback, gd, book);
fclose (file); fclose (file);
if (thread) if (thread)
g_thread_join (thread) != nullptr; g_thread_join (thread);
} }
} }

View File

@ -1425,10 +1425,10 @@ xaccFreeAccount (Account *acc)
priv->last_num = nullptr; priv->last_num = nullptr;
priv->tax_us_code = nullptr; priv->tax_us_code = nullptr;
priv->tax_us_pns = nullptr; priv->tax_us_pns = nullptr;
priv->color == nullptr; priv->color = nullptr;
priv->sort_order == nullptr; priv->sort_order = nullptr;
priv->notes == nullptr; priv->notes = nullptr;
priv->filter == nullptr; priv->filter = nullptr;
priv->parent = nullptr; priv->parent = nullptr;
priv->children = nullptr; priv->children = nullptr;

View File

@ -895,7 +895,7 @@ decimal_from_binary (uint64_t d[dec_array_size], uint64_t hi, uint64_t lo)
d[0] = lo & bin_mask; d[0] = lo & bin_mask;
d[1] = (lo >> 32) & bin_mask; d[1] = (lo >> 32) & bin_mask;
d[2] = hi & bin_mask; d[2] = hi & bin_mask;
d[3] = (hi >> 32) & bin_mask, 0; d[3] = (hi >> 32) & bin_mask;
d[0] += coeff_3[3] * d[3] + coeff_2[3] * d[2] + coeff_1[3] * d[1]; d[0] += coeff_3[3] * d[3] + coeff_2[3] * d[2] + coeff_1[3] * d[1];
uint64_t q {d[0] / dec_div}; uint64_t q {d[0] / dec_div};