You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ar...@apache.org on 2022/11/21 09:39:18 UTC
[incubator-nuttx] 06/12: Fix Error: audio/wm8994.c:485:26: error: result of comparison of constant 65536 with expression of type 'uint16_t' (aka 'unsigned short') is always false
This is an automated email from the ASF dual-hosted git repository.
archer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 7bda8747b283d62fe9a008bde5cafd8465655660
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 20 13:59:17 2022 +0800
Fix Error: audio/wm8994.c:485:26: error: result of comparison of constant 65536 with expression of type 'uint16_t' (aka 'unsigned short') is always false
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
drivers/audio/wm8994.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/audio/wm8994.c b/drivers/audio/wm8994.c
index 5f77f2e2b6..7e94d44a24 100644
--- a/drivers/audio/wm8994.c
+++ b/drivers/audio/wm8994.c
@@ -482,7 +482,7 @@ static void wm8994_setvolume(FAR struct wm8994_dev_s *priv, uint16_t volume,
{
leftlevel = volume;
}
- else if (priv->balance == b16ONE)
+ else if (priv->balance == (b16ONE - 1))
{
leftlevel = 0;
}