View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007585 | Taler | mechant backend | public | 2023-01-13 13:11 | 2023-09-23 15:09 |
Reporter | Florian Dold | Assigned To | Christian Grothoff | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Target Version | 0.9.3 | Fixed in Version | 0.9.3 | ||
Summary | 0007585: merchant build shows compiler warning | ||||
Description | plugin_merchantdb_postgres.c: In function ‘lookup_accounts_cb’: plugin_merchantdb_postgres.c:531:3: warning: ‘<unknown>’ may be used uninitialized [-Wmaybe-uninitialized] 531 | call_with_accounts (lic, | ^~~~~~~~~~~~~~~~~~~~~~~~ 532 | num_results, | ~~~~~~~~~~~~ 533 | accounts); | ~~~~~~~~~ plugin_merchantdb_postgres.c:445:1: note: by argument 3 of type ‘const struct TALER_MERCHANTDB_AccountDetails[]’ to ‘call_with_accounts’ declared here 445 | call_with_accounts (struct LookupInstancesContext *lic, | ^~~~~~~~~~~~~~~~~~ CCLD libtaler_plugin_merchantdb_postgres.la | ||||
Tags | No tags attached. | ||||
|
Yeah, I checked, couldn't find at all why gcc thinks there is an issue with that code. Didn't want to just brutally memset() the warning away, so it stays "for now". |
|
Which platform do you get this? Just tried on Debian with gcc-10 and gcc-12 and no warning even with -Wextra. |
|
I get this both on my old Arch Linux installation and on Fedora on my Workstation: [fdold-work@fedora merchant]$ gcc --version gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4) Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
Update: affects gcc-11 and gcc-12, on -O2 with -Wall. Jose is on it as it looks like a gcc bug. |
|
ccfd643c..d940480c adds a work-around using memset(). Just to make the warning disappear, as otherwise we'll surely hear again of it, even though it is a gcc bug. |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-01-13 13:11 | Florian Dold | New Issue | |
2023-01-13 13:11 | Florian Dold | Status | new => assigned |
2023-01-13 13:11 | Florian Dold | Assigned To | => Christian Grothoff |
2023-01-13 17:00 | Christian Grothoff | Note Added: 0019662 | |
2023-01-13 18:50 | Christian Grothoff | Note Added: 0019663 | |
2023-01-15 14:59 | Florian Dold | Note Added: 0019668 | |
2023-01-15 22:45 | Christian Grothoff | Note Added: 0019675 | |
2023-02-01 15:43 | Christian Grothoff | Target Version | 0.9.2 => 0.11 |
2023-04-18 19:36 | Christian Grothoff | Note Added: 0020117 | |
2023-04-18 19:36 | Christian Grothoff | Status | assigned => resolved |
2023-04-18 19:36 | Christian Grothoff | Resolution | open => fixed |
2023-04-18 19:36 | Christian Grothoff | Fixed in Version | => 0.9.3 |
2023-04-18 19:36 | Christian Grothoff | Target Version | 0.11 => 0.9.3 |
2023-09-23 15:09 | Christian Grothoff | Status | resolved => closed |