View Issue Details

IDProjectCategoryView StatusLast Update
0007585Talermechant backendpublic2023-09-23 15:09
ReporterFlorian Dold Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.9.3Fixed in Version0.9.3 
Summary0007585: merchant build shows compiler warning
Descriptionplugin_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
TagsNo tags attached.

Activities

Christian Grothoff

2023-01-13 17:00

manager   ~0019662

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".

Christian Grothoff

2023-01-13 18:50

manager   ~0019663

Which platform do you get this? Just tried on Debian with gcc-10 and gcc-12 and no warning even with -Wextra.

Florian Dold

2023-01-15 14:59

manager   ~0019668

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.

Christian Grothoff

2023-01-15 22:45

manager   ~0019675

Update: affects gcc-11 and gcc-12, on -O2 with -Wall. Jose is on it as it looks like a gcc bug.

Christian Grothoff

2023-04-18 19:36

manager   ~0020117

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.

Issue History

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