`RULE-8-4`: Improve detection of compatible types

Offen
#780 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

Difficulty-Medium false positive/false negative Impact-Low Standard-CERT-C
Affected rules
  • DCL40-C
  • RULE-8-3
  • RULE-8-4
Description

There are some cases of compatible types which are not currently detected by these queries:

  • Enumerations - these are compatible with a specified integer type.
  • Array types - are compatible if the element types are compatible (and the sizes match, where appropriate)
  • Pointer types - are compatible in the pointer target types are compatible.
  • Function types - if the return/argument types are compatible (with some exceptions for functions that don't declare arguments).
Example

Vorherrschende Sprache
CodeQL
Sterne
227
Forks
82
Ø Merge
6 T. 7 Std.
Gemergte PRs (30 T.)
9

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus github/codeql-coding-standards

Alle Issues in github/codeql-coding-standards

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.