Bug 1366

Summary: [LLVM] error: class 'sqlite3' was previously declared as a struct
Product: ns-3 Reporter: Gustavo J. A. M. Carneiro <gjcarneiro>
Component: statsAssignee: Mitch Watrous <watrous>
Status: RESOLVED FIXED    
Severity: normal CC: daniel.camara, ns-bugs, tjkopena
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 1345    
Attachments: Change class to struct patch

Description Gustavo J. A. M. Carneiro 2012-02-22 06:15:16 UTC
Compiling with clang++ 2.9 (LLVM):

In file included from ../src/stats/model/sqlite-data-output.cc:30:
../src/stats/model/sqlite-data-output.h:30:1: error: class 'sqlite3' was previously declared as a struct
      [-Werror,-Wmismatched-tags]
class sqlite3;
^~~~~
struct
In file included from ../src/stats/model/sqlite-data-output.cc:23:
/usr/include/sqlite3.h:227:16: note: previous use is here
typedef struct sqlite3 sqlite3;
               ^
1 error generated.

I think just changing "class sqlite3;" to "struct sqlite3;" makes it go away.
Comment 1 Daniel Camara 2012-03-09 08:59:24 UTC
Created attachment 1354 [details]
Change class to struct patch

To solve the "class 'sqlite3' was previously declared as a struct" LLVM error

 The patch simply changes the term "class"  to "struct"  The maintainer should evaluate if this is the best solution.
Comment 2 Daniel Camara 2012-03-12 11:46:42 UTC
Fixed changeset:   7762:61b2ef996f45