coccinelle: check return type
This commit is contained in:
parent
7a9d852a0d
commit
9963645ba7
|
@ -0,0 +1,34 @@
|
||||||
|
@@
|
||||||
|
type T, B != T;
|
||||||
|
identifier func, i;
|
||||||
|
expression E;
|
||||||
|
@@
|
||||||
|
|
||||||
|
T func (...) {
|
||||||
|
...
|
||||||
|
(
|
||||||
|
T i;
|
||||||
|
|
|
||||||
|
T i = E;
|
||||||
|
|
|
||||||
|
static B i;
|
||||||
|
|
|
||||||
|
static B i = E;
|
||||||
|
|
|
||||||
|
-B i;
|
||||||
|
+T i;
|
||||||
|
|
|
||||||
|
-B i = E;
|
||||||
|
+T i = E;
|
||||||
|
)
|
||||||
|
<+...
|
||||||
|
(
|
||||||
|
return i;
|
||||||
|
|
|
||||||
|
return (T) i;
|
||||||
|
)
|
||||||
|
...+>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ extern int _log_domain;
|
||||||
(!strncmp(STR, STATIC_STR, strlen(STATIC_STR)))
|
(!strncmp(STR, STATIC_STR, strlen(STATIC_STR)))
|
||||||
|
|
||||||
#if !defined(HAVE_STRCHRNUL)
|
#if !defined(HAVE_STRCHRNUL)
|
||||||
static inline char *
|
static inline const char *
|
||||||
strchrnul(const char *s, int c)
|
strchrnul(const char *s, int c)
|
||||||
{
|
{
|
||||||
const char *p = s;
|
const char *p = s;
|
||||||
|
|
|
@ -4489,7 +4489,7 @@ _handle_esc_dcs(Termpty *ty,
|
||||||
}
|
}
|
||||||
*b = 0;
|
*b = 0;
|
||||||
if ((*cc == ST) || (*cc == '\\')) cc++;
|
if ((*cc == ST) || (*cc == '\\')) cc++;
|
||||||
else return 0;
|
else {return 0};
|
||||||
len = cc - c;
|
len = cc - c;
|
||||||
switch (buf[0])
|
switch (buf[0])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue