mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-07-11 06:40:29 +00:00
- fixed bug where people using defines as their array argument size were getting parse issues
- suppress warning for CException where it wants to remind me that the address is always going to be true. duh. git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@196 bf332499-1b4d-0410-844d-d2d48d5cc64c
This commit is contained in:
@@ -143,7 +143,7 @@ class CMockHeaderParser
|
||||
return 'void'
|
||||
else
|
||||
c=0
|
||||
arg_list.gsub!(/(\w+)(?:\s*\[[\s\d]*\])+/,'*\1') # magically turn brackets into asterisks
|
||||
arg_list.gsub!(/(\w+)(?:\s*\[[\s\d\w]*\])+/,'*\1') # magically turn brackets into asterisks
|
||||
arg_list.gsub!(/\s+\*/,'*') # remove space to place asterisks with type (where they belong)
|
||||
arg_list.gsub!(/\*(\w)/,'* \1') # pull asterisks away from arg to place asterisks with type (where they belong)
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ compiler:
|
||||
options:
|
||||
- '-c'
|
||||
- '-Wall'
|
||||
- '-Wno-address'
|
||||
- '-std=c99'
|
||||
- '-pedantic'
|
||||
includes:
|
||||
|
||||
@@ -9,6 +9,7 @@ compiler:
|
||||
- '-c'
|
||||
- '-Wall'
|
||||
- '-std=c99'
|
||||
- '-Wno-address'
|
||||
- '-pedantic-errors'
|
||||
includes:
|
||||
prefix: '-I'
|
||||
|
||||
@@ -10,11 +10,12 @@
|
||||
int x;
|
||||
int y;
|
||||
} POINT_T;
|
||||
#define ARRAY_A_SIZE (5)
|
||||
|
||||
:mockable: |
|
||||
void foo(POINT_T* a);
|
||||
POINT_T* bar(void);
|
||||
void fooa(POINT_T a[]);
|
||||
void fooa(POINT_T a[ARRAY_A_SIZE]);
|
||||
void foos(const char * a);
|
||||
const char * bars(void);
|
||||
void no_pointers(int a, char* b);
|
||||
|
||||
Reference in New Issue
Block a user