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");
|
comp_info(dev, "dai_comp_trigger_internal(), XRUN");
|
||||||
dd->xrun = 1;
|
dd->xrun = 1;
|
||||||
|
|
||||||
/* fallthrough */
|
COMPILER_FALLTHROUGH;
|
||||||
case COMP_TRIGGER_STOP:
|
case COMP_TRIGGER_STOP:
|
||||||
comp_dbg(dev, "dai_comp_trigger_internal(), STOP");
|
comp_dbg(dev, "dai_comp_trigger_internal(), STOP");
|
||||||
ret = dma_stop(dd->chan);
|
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");
|
comp_dbg(dev, "dai_comp_trigger_internal(), PAUSE");
|
||||||
ret = dma_pause(dd->chan);
|
ret = dma_pause(dd->chan);
|
||||||
dai_trigger(dd->dai, cmd, dev->direction);
|
dai_trigger(dd->dai, cmd, dev->direction);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,3 +17,12 @@
|
||||||
|
|
||||||
#define __section(x) __attribute__((section(x)))
|
#define __section(x) __attribute__((section(x)))
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
|
||||||
|
#define COMPILER_FALLTHROUGH __attribute__((fallthrough))
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define COMPILER_FALLTHROUGH /* fallthrough */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue