- 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:
mvandervoord
2010-12-08 15:56:33 +00:00
parent 6ba1032477
commit ac35f1bfe4
4 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -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)
+1
View File
@@ -8,6 +8,7 @@ compiler:
options:
- '-c'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
+1
View File
@@ -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);