github / github/codeql

CPP: Some guard questions about control

Aperta
#10,568 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
question
Lingua principale
CodeQL
Stelle
10.1k
Fork
2.1k
Merge medio
2g 15h
PR unite (30g)
141

Descrizione

Hi!
I want to detect if there is a check for NULL return value of a function.And I want to get the block which is controlled by `ret == NULL`
So Do I have to consider the following four cases?
```
if(ret == NULL) //comparesEq(ret, null, 0, true, true))
if(ret != NULL) //comparesEq(ret, null, 0, false, true)
if(ret) // I don't know yet how to write this
if(!ret) //I don't know yet how to write this
```
Or Is there a method that includes the above four cases?

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.