I am a relatively new C programmer, so please bear with my ignorance :-) I am trying to get a custom tool for valgrind to compile. The tool was originally written about 8 years ago, and was based on a much older version of valgrind. The original version of valgrind no longer compiles on current kernels, so I am trying to integrate the custom tool with the latest version of valgrind from the svn repository.
I have a very persistent problem in that I keep getting a message saying that: error: parameter xxxx has an incomplete type
I read the post at: [make - C: field has incomplete type - Stack Overflow][http://ift.tt/1AWx2Rs] and have verified that the include file is inded being included in the c program.
I suspect it has more to do with the fact that the definition of the struct has changed over time:
old code `typedef struct _VgHashTable * VgHashTable;
/* Make a new table. Allocates the memory with VG_(calloc)(), so can be freed with VG_(free)(). The table starts small but will periodically be expanded. This is transparent to the users of this module. / extern VgHashTable VG_(HT_construct) ( HChar name ); `
*new icode * `typedef struct _VgHashTable VgHashTable;
/* Make a new table. Allocates the memory with VG_(calloc)(), so can be freed with VG_(free)(). The table starts small but will periodically be expanded. This is transparent to the users of this module. The function never returns NULL. */ extern VgHashTable VG_(HT_construct) ( const HChar name ); `
The code that accesses the VgHashTable is: static Int ca_count_hashtable( VgHashTable table )
How can I change the code to be able to correctly use the new definition of VgHashTable?
Thanks in advance
Aucun commentaire:
Enregistrer un commentaire