瀏覽代碼

bluedroid: fix -Wchar-subscripts warning

'unsigner char' cast recommended, https://stackoverflow.com/a/60696378
Anton Maklakov 4 年之前
父節點
當前提交
b69efa20ad
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      components/bt/host/bluedroid/bta/hf_ag/bta_ag_cmd.c

+ 1 - 1
components/bt/host/bluedroid/bta/hf_ag/bta_ag_cmd.c

@@ -612,7 +612,7 @@ static UINT8 bta_ag_parse_chld(tBTA_AG_SCB *p_scb, char *p_s)
     INT16   idx = -1;
     UNUSED(p_scb);
 
-    if (!isdigit(p_s[0])) {
+    if (!isdigit((unsigned char)p_s[0])) {
         return BTA_AG_INVALID_CHLD;
     }