[splint-discuss] checking Oracle Pro*C files
Phil Lawrence
prlawrence at gmail.com
Mon Jan 22 09:56:53 PST 2007
Hello,
I'm fairly new to C and am working with Oracle Pro*C. This means my
source files have items for the Oracle preprocessor like this in it:
EXEC SQL INCLUDE sqlca;
EXEC SQL BEGIN DECLARE SECTION;
VARCHAR sqli_inputAccount[15];
EXEC SQL END DECLARE SECTION;
How can I have splint ignore these things?
I had the bright idea that I could just run my .pc files through the
Oracle preprocessor and then splint the resulting .c file... That
seemed to work (splint did start talking about my .c file), but then
splint said it was back to checking the .pc file (see output copied
below). Why?
$ splint ~/Volumes/11/src/dcv_ex_account_table.c
Splint 3.1.1 --- 22 Jan 2007
../../../Volumes/11/src/dcv_ex_account_table.c:41:32:
Initializer block for sqladt has 3 fields, but struct sqladts has 4 fields:
1, 1, 0
Initializer does not set every field in the structure. (Use -fullinitblock to
inhibit warning)
../../../Volumes/11/src/dcv_ex_account_table.c:54:1:
Initializer block for sqltds has 2 fields, but struct sqltdss has 3 fields:
1, 0
../../../Volumes/11/src/dcv_ex_account_table.c:114:12:
Initializer block for sqlstm has 2 fields, but struct sqlexd has 38 fields:
12, 42
dcv_ex_account_table.pc: (in function dcv_openCursorExAccountTable)
dcv_ex_account_table.pc:52:10: Parameter 1 (db_name) to function strcpy is
declared unique but may be aliased externally by parameter 2 (i_db_name)
A unique or only parameter may be aliased by some other parameter or visible
global. (Use -mayaliasunique to inhibit warning)
dcv_ex_account_table.pc:56:7: Parse Error. (For help on parse errors, see
splint -help parseerrors.)
*** Cannot continue.
How should I use splint to help me with these Pro*C source files?
Thanks,
Phil Lawrence
More information about the splint-discuss
mailing list