View Issue Details

IDProjectCategoryView StatusLast Update
0007585Talermechant backendpublic2023-02-01 15:43
ReporterFlorian Dold Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
Target Version0.9.6 
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,
      | ^~~~~~~~~~~~~~~~~~
TagsNo tags attached.


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

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.

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