cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [Cocci] __asm statements confuse spatch
@ 2018-10-16 22:49 Timur Tabi
  2018-10-17  5:25 ` Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: Timur Tabi @ 2018-10-16 22:49 UTC (permalink / raw)
  To: cocci

I'm trying to modify a Windows .c file, and it contains several __asm
(or _asm or asm) statements that confuse spatch.  They look like this:

    _asm {mov ax, ss}
    __asm mov uRetval,eax                // Just keep 32 bits.
    __asm {
        PAUSE
        PAUSE
    }

And so on.  Is there a way to get spatch to ignore these statements?

Another problem I've having with the source file is that it has
inconsistent usage of braces, and sometimes spatch wants to add
unnecessary braces that look off.  For example, this:

        if (...)
            DBG_PRINTF((...));
        else
            DBG_PRINTF((...));
        }

(the } belongs to some if-statement much earlier in code somewhere) becomes:

        if (...) {
            NV_PRINTF(...);
        }
        else {
            NV_PRINTF(...);
        }
        }

I really don't want spatch to add the braces.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-17 12:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-16 22:49 [Cocci] __asm statements confuse spatch Timur Tabi
2018-10-17  5:25 ` Julia Lawall
2018-10-17 12:15   ` Timur Tabi
2018-10-17 12:26     ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).