Merge lp:~jfi/dee/LP988443 into lp:dee
Status: | Superseded |
---|---|
Proposed branch: | lp:~jfi/dee/LP988443 |
Merge into: | lp:dee |
Diff against target: |
38 lines (+1/-5) 3 files modified
src/dee-filter.h (+0/-2) src/dee-model-reader.h (+0/-2) src/dee-transaction.h (+1/-1) |
To merge this branch: | bzr merge lp:~jfi/dee/LP988443 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michal Hruby (community) | Needs Fixing | ||
Review via email: mp+115040@code.launchpad.net |
This proposal has been superseded by a proposal from 2012-07-16.
Commit message
Fixed typedef redefinition of DeeFilter. (LP #988443)
Removed erronous comma at end of enumerator list.
Description of the change
It fixes: https:/
dee.h is including dee-filter-model.h, dee-filter.h, and dee-model-reader.h.
The 3 header files are defining the typedef DeeFilter.
It implies compilation errors with clang and warnings with 'gcc -pedantic' when compiling a code including dee.h. dee cannot be compiled with clang for this reason too.
1/ According to comment in dee-filter.h and dee-model-reader.h, only dee.h can be included.
2/ dee-filter.h is included by dee-filter.c and dee-filter-model.c but both are also including dee-filter-model.h, so DeeFilter will be defined. dee-filter-model.h is even included by dee-filter.h itself.
3/ dee-model-reader.h is included by dee-index.c and dee-model-reader.c but both are not using DeeFilter
4/ I have verified that compilation working fine after the modification of this branch with both clang and gcc
So, my conclusion is that the typedef can safely be removed from dee-filter.h and dee-model-reader.h or did I miss something?
It can be tested by compiling the following code:
#include <dee.h>
int main(int argc, char **argv)
{
return 0;
}
with the command lines:
- gcc `pkg-config --cflags dee-1.0` -pedantic file.c
- clang `pkg-config --cflags dee-1.0` file.c
Hi, thanks for contribution! I tried compiling the test you attached, and I'm also getting: dee-1.0/ dee-transaction .h:104: 38: warning: comma at end of enumerator list [-pedantic]
/usr/include/
Could you please fix that in this branch as well, to make the public headers pedantic-proof?