-1
我有兩個場景,我不能夠解決這些警告。這些都是重複的警告警告634和613的警告:MISRA
1) Warning 634: Strong type mismatch (type 'SPI_FSH_HANDLE') in equality or conditional
#define SPI_NULL NULL
SPI_FSH_HANDLE flash;
if (flash != SPI_NULL)
我試圖檢查NULL條件,但仍警告堅持。代碼的
2)Warning 613: Possible use of null pointer 'flash' in left argument to operator '->'
部分:
if (strstr(flash->name, "M25P")!= SPI_NULL)
如何避免既警告???