Ticket #161 (closed defect: fixed)
Patch: Don't initialize variables in header files
| Reported by: | markdoliner | Owned by: | smoku |
|---|---|---|---|
| Priority: | major | Component: | Build |
| Version: | 2.1.17 | Keywords: | |
| Cc: | Tracforge_linkmap: | ||
| Blocking: | Blocked By: |
Description
The _stanza_errors array is initialized in util/util.h, however, this causes a large number of these warnings in various files:
storage.c: At top level: ../util/util.h:379: warning: ‘_stanza_errors’ defined but not used
I think the correct way to handle this is to declare the variable as extern in the header file, and then to initialize the variable in a source file.
I'm using gcc 4.1.2 with CFLAGS="-ggdb -Wall -Wdeclaration-after-statement -Werror-implicit-function-declaration"
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
