Did you define __asm with a macro?

Without any macro definitions, splint doesn't report any warnings for that
code.  It does if you don't have the { ... } though, perhaps that is what
you mean.

Without them, the __asm is cut, and splint does report the ifempty
warning.  You can use -ifempty on the command line or as a control comment
like this:

  if (debuggerRunning)
    /*@-ifempty@*/ __asm { int 3 }; /*@=ifempty@*/

--- Dave

On Fri, 10 May 2002, Taed Wynnell wrote:

> I just started using Split this morning to try it out on my Windows device
> driver.  Whew!  Lots and lots of "errors", so I'm just concentrating on the
> "-weak" ones...
>
> I have a macro that I use a lot that looks something like:
>       if (debuggerRunning) {
>               __asm { int 3 };
>       }
>
> Of course, I don't expect Splint to do anything with the assembly, but I
> then get the "empty if statement" warning all over the place.  I'd like to
> just fix that warning in the macro, rather than suppress it altogether.  The
> documentation doesn't seem to show an annotation that could be used for that
> case, but it seems like something that would have come up before...
>
> Is there an undocumented annotation for this?  Is there another way of
> avoiding the warning without suppressing the warning for all the code?
>
> Thanks!
>
>
>

Reply via email to