瀏覽代碼

avoid warning message of sequence-point

board/ports/touch/gt911/src/gt911.c: warning: operation on '*(config + 8)' may be undefined [-Wsequence-point]
                config[8] = config[8] ^= (1 << 3);
                ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
KunYi Chen 1 年之前
父節點
當前提交
b3f7591811
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      bsp/renesas/ra6m3-hmi-board/board/ports/touch/gt911/src/gt911.c

+ 1 - 1
bsp/renesas/ra6m3-hmi-board/board/ports/touch/gt911/src/gt911.c

@@ -375,7 +375,7 @@ static rt_err_t gt911_control(struct rt_touch_device *touch, int cmd, void *arg)
     }
     case RT_TOUCH_CTRL_SET_X_TO_Y:
     {
-        config[8] = config[8] ^= (1 << 3);
+        config[8] ^= (1 << 3);
         break;
     }
     case RT_TOUCH_CTRL_SET_MODE: