Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1231501

Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser than zero

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser than zero
Date 2015-09-23 17:20 +0200
Message-ID <qbTZU-7VV-7@gated-at.bofh.it> (permalink)
References (1 earlier) <qb6FQ-42w-9@gated-at.bofh.it> <qb912-7vU-33@gated-at.bofh.it> <qb9u2-83M-15@gated-at.bofh.it> <qbxG3-P2-47@gated-at.bofh.it> <qbMOK-5WP-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> In the example above spatch finds ull, ulli, but not ul and uli.
> If you add int to unsigned long long, it won't find anything.

I suggest to take another look at the use of type modifiers
in the semantic patch language. It seems that it matters occasionally
to specify them explicitly.

How do you think about to reuse a SmPL script like the following?


@find_unsigned@
typedef _Bool, bool, u8, u16, u32, u64;
{
unsigned,
unsigned char,
unsigned int,
unsigned short,
unsigned short int,
unsigned long,
unsigned long int,
unsigned long long,
unsigned long long int,
size_t,
_Bool,
bool,
u8,
u16,
u32,
u64
} var;
@@
*var


Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser  than zero SF Markus Elfring <elfring@users.sourceforge.net> - 2015-09-22 17:30 +0200
  Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser than  zero Andrzej Hajda <a.hajda@samsung.com> - 2015-09-23 09:40 +0200
    Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser  than zero SF Markus Elfring <elfring@users.sourceforge.net> - 2015-09-23 17:20 +0200

csiph-web