View Issue Details

IDProjectCategoryView StatusLast Update
0007585Talermerchant backendpublic2023-09-23 13:09
ReporterFlorian Dold Assigned ToChristian Grothoff Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
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.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2023-01-13 16: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 17: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 13: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 21: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 17: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 ModifiedUsernameFieldChange
2023-01-13 12:11Florian DoldNew Issue
2023-01-13 12:11Florian DoldStatusnew => assigned
2023-01-13 12:11Florian DoldAssigned To => Christian Grothoff
2023-01-13 16:00Christian GrothoffNote Added: 0019662
2023-01-13 17:50Christian GrothoffNote Added: 0019663
2023-01-15 13:59Florian DoldNote Added: 0019668
2023-01-15 21:45Christian GrothoffNote Added: 0019675
2023-02-01 14:43Christian GrothoffTarget Version0.9.2 => 0.11
2023-04-18 17:36Christian GrothoffNote Added: 0020117
2023-04-18 17:36Christian GrothoffStatusassigned => informing
2023-04-18 17:36Christian GrothoffResolutionopen => fixed
2023-04-18 17:36Christian GrothoffFixed in Version => 0.9.3
2023-04-18 17:36Christian GrothoffTarget Version0.11 => 0.9.3
2023-09-23 13:09Christian GrothoffStatusinforming => closed
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend