[splint-discuss] parse error in non-conventional C programming style

vivek kumar freewill1729 at gmail.com
Sun Jun 21 04:55:06 PDT 2009


I have included files like file1.c. But how do I force splint to check gtk,
gdk header files, which supposedly is giving rise to parse errors.

Hi

I came across some code which is in the following style

//file1.c
#include <stdlib.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>

void print(void){

//use some gdk functions like gdk_pixmap_new()
//or use some varibales like gint, gboolean etc

 printf("Hello world\n");

}

//main.c

#include <stdio.h>
#include "file1.c"

int main(int argc, char *argv[]){

 print();

 return EXIT_SUCCESS;
}

The code has *.c files included rather than *.h files i.e. the code has not
been separated into declaration part(*.h) and definition part(*.c), cleanly.
When I use splint on such code I get parse errors when gdk constructs are
used.
How can I force splint to check the gtk and gdk headers file in this style
of programming.

I would be deeply thankful for some suggestions.


-- 
Thanking You
Sincerely
Vivek Kumar



-- 
Thanking You
Sincerely
Vivek Kumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20090621/586d20ad/attachment.html 


More information about the splint-discuss mailing list