mirror of https://github.com/thesofproject/sof.git
dai: add fall through markers for clang
for some reason the clang version with oss-fuzz doesn't recognize the comments so lets add this attributes in the meantime. XCC does not like them so lets only use them with clang. Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
This commit is contained in:
parent
51b64f460a
commit
918f22c206
|
@ -692,7 +692,7 @@ static int dai_comp_trigger_internal(struct comp_dev *dev, int cmd)
|
|||
comp_info(dev, "dai_comp_trigger_internal(), XRUN");
|
||||
dd->xrun = 1;
|
||||
|
||||
/* fallthrough */
|
||||
COMPILER_FALLTHROUGH;
|
||||
case COMP_TRIGGER_STOP:
|
||||
comp_dbg(dev, "dai_comp_trigger_internal(), STOP");
|
||||
ret = dma_stop(dd->chan);
|
||||
|
@ -702,6 +702,7 @@ static int dai_comp_trigger_internal(struct comp_dev *dev, int cmd)
|
|||
comp_dbg(dev, "dai_comp_trigger_internal(), PAUSE");
|
||||
ret = dma_pause(dd->chan);
|
||||
dai_trigger(dd->dai, cmd, dev->direction);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -17,3 +17,12 @@
|
|||
|
||||
#define __section(x) __attribute__((section(x)))
|
||||
|
||||
#ifdef __clang__
|
||||
|
||||
#define COMPILER_FALLTHROUGH __attribute__((fallthrough))
|
||||
|
||||
#else
|
||||
|
||||
#define COMPILER_FALLTHROUGH /* fallthrough */
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue