mirror of
https://frontier.innolan.net/rainlance/amiga-ntimed.git
synced 2026-03-19 09:23:45 +00:00
Mark needless return(bla) with a macro so we can shut up FlexeLint
This commit is contained in:
@ -85,6 +85,15 @@
|
|||||||
*/
|
*/
|
||||||
#define __match_proto__(xxx) /*lint -e{818} */
|
#define __match_proto__(xxx) /*lint -e{818} */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Some functions never return, and there's nothing Turing can do about it.
|
||||||
|
* Some compilers think you should still include a final return(bla) in
|
||||||
|
* such functions, while other tools complain about unreachable code.
|
||||||
|
* Wrapping in a macro means we can shut the tools up.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define NEEDLESS_RETURN(foo) return(foo)
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Compiler tricks
|
* Compiler tricks
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -79,7 +79,7 @@ getdst(enum ocx_chan chan)
|
|||||||
if (chan == OCX_DEBUG)
|
if (chan == OCX_DEBUG)
|
||||||
return (stdout);
|
return (stdout);
|
||||||
WRONG("Wrong ocx_chan");
|
WRONG("Wrong ocx_chan");
|
||||||
return (NULL);
|
NEEDLESS_RETURN(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __match_proto__()
|
static void __match_proto__()
|
||||||
|
|||||||
@ -167,7 +167,7 @@ tb_Now(struct timestamp *storage)
|
|||||||
|
|
||||||
(void)storage;
|
(void)storage;
|
||||||
WRONG("No TB_Now");
|
WRONG("No TB_Now");
|
||||||
return (NULL);
|
NEEDLESS_RETURN(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
tb_now_f *TB_Now = tb_Now;
|
tb_now_f *TB_Now = tb_Now;
|
||||||
@ -179,7 +179,7 @@ tb_Sleep(double dur)
|
|||||||
{
|
{
|
||||||
(void)dur;
|
(void)dur;
|
||||||
WRONG("No TB_Sleep");
|
WRONG("No TB_Sleep");
|
||||||
return (-1);
|
NEEDLESS_RETURN(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
tb_sleep_f *TB_Sleep = tb_Sleep;
|
tb_sleep_f *TB_Sleep = tb_Sleep;
|
||||||
|
|||||||
Reference in New Issue
Block a user