dee

Merge lp:~jfi/dee/LP988443 into lp:dee

Proposed by Jean-Philippe Orsini
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
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://bugs.launchpad.net/dee/+bug/988443

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

To post a comment you must log in.
Revision history for this message
Michal Hruby (mhr3) wrote :

Hi, thanks for contribution! I tried compiling the test you attached, and I'm also getting:
/usr/include/dee-1.0/dee-transaction.h:104:38: warning: comma at end of enumerator list [-pedantic]

Could you please fix that in this branch as well, to make the public headers pedantic-proof?

review: Needs Fixing
lp:~jfi/dee/LP988443 updated
373. By Jean-Philippe Orsini

removed wrong comma at end of enumerator

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/dee-filter.h'
2--- src/dee-filter.h 2012-01-09 14:33:36 +0000
3+++ src/dee-filter.h 2012-07-16 18:21:19 +0000
4@@ -30,8 +30,6 @@
5
6 G_BEGIN_DECLS
7
8-typedef struct _DeeFilter DeeFilter;
9-
10 /**
11 * DeeFilterMapFunc:
12 * @orig_model: The model containing the original data to filter
13
14=== modified file 'src/dee-model-reader.h'
15--- src/dee-model-reader.h 2011-12-15 11:28:16 +0000
16+++ src/dee-model-reader.h 2012-07-16 18:21:19 +0000
17@@ -30,8 +30,6 @@
18
19 G_BEGIN_DECLS
20
21-typedef struct _DeeFilter DeeFilter;
22-
23 /**
24 * DeeModelReaderFunc:
25 * @model: The model being indexed
26
27=== modified file 'src/dee-transaction.h'
28--- src/dee-transaction.h 2011-12-15 10:49:06 +0000
29+++ src/dee-transaction.h 2012-07-16 18:21:19 +0000
30@@ -101,7 +101,7 @@
31 */
32 typedef enum {
33 DEE_TRANSACTION_ERROR_CONCURRENT_MODIFICATION = 1,
34- DEE_TRANSACTION_ERROR_COMMITTED = 2,
35+ DEE_TRANSACTION_ERROR_COMMITTED = 2
36 } DeeTransactionError;
37
38 /**

Subscribers

People subscribed via source and target branches