Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

`RULE-21-15`: Improve detection of compatible types

Offen
#573 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-Medium Standard-MISRA-C
Affected rules
  • RULE-21-15
Description

The query for this rule is currently too strict - it requires the types be identical (after stripping specifiers), instead of compatible. For example, it does not allow a combination of pointers and arrays, or array types with different sizes, or types which are compatible but not identical (e.g. signed int and int.

Example
void example_function(int i1[80], int *i2, int i3[10], signed int *i4) {
  memcpy(i1,i2,1); // COMPLIANT[FALSE_POSITIVE]
  memcpy(i1,i3,1); // COMPLIANT[FALSE_POSITIVE]
  memcpy(i2,i3,1); // COMPLIANT[FALSE_POSITIVE]
  memcpy(i2,i4,1); // COMPLIANT[FALSE_POSITIVE]
}
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.