[splint-discuss] empedded programming, __interrupt
Matuschka, Sebastian
Sebastian.Matuschka at gcd-solutions.de
Wed Aug 15 08:48:04 EDT 2007
Hello,
Lastly i found the point where to add code if it is an __interrupt:
cscannerHelp.c(line 1545) in int cscannerHelp_processIdentifier(cstring
id)
I added in line 1637:
else if (cstring_equalLit (id, "__interrupt"))
{
tok = QUNUSED;
}
That works for me :)
Greetings
Sebastian
>
> Hello Ralf,
>
> >You could put something like the following in a header file.
> >
> > #ifdef S_SPLINT_S
> > /*@-namechecks@*/
> > # define __interrupt /*@unused@*/
> > /*@=namechecks@*/
> > #endif
>
> That sounds good, yes.
> I don't want to include it in a header in the sources of the
> embedded project, so i made a library and let it load in the
> splint rc file.
> I called the new library standard_softune.h and created a
> standard_softune.lcd out of it.
> In the splint rc file i added this line:
> -load ..\lib\standard_softune.lcd
> As far as i can see splint accepts this.
> I added
> /*@-namechecks@*/
> # define __nosavereg
> # define __interrupt /*@unused@*/
> /*@=namechecks@*/
> to the standard_softune.h but i guess that splint doesn't
> understand it correctly, the line in the .lcd file is:
> ^22 0|@11|^#__nosavereg#__interrupt
> I think that the namechecks commands are interpreted when
> creating the lib but then are not in the lib file itself.
> I have no idea how to avoid this. I could write two
> /*@-namechecks@*/ one after the other. But that doesn't work.
>
> Sebastian
More information about the splint-discuss
mailing list