Ich verwende MPLAB X (3.26) mit einem PIC32 auf Windows (XC32 v1.40 Compiler). Ich versuche, Schiene zu verwenden, um statische Code-Analyse auf jemandes Code als Teil einer Überprüfung durchzuführen. Ich habe die meisten Compiler definiert und Suchpfade sortiert, aber sind ein bisschen ratlos, wenn es darum geht, die Parse-Fehler in den PIC32-Standard-Include-Dateien zu vermeiden.Verwenden von Schiene für statische Code-Analyse auf Windowms mit MPLAB, wie Systemdateianalyse Fehler zu vermeiden
Der Befehl I Schiene laufen bin mit ist
splint^
-D"__32MX370F512L__"^
-D"__PIC32_FEATURE_SET__"=370^
-D"__LANGUAGE_C__"^
+I"C:/Program Files (x86)/Microchip/xc32/v1.40/pic32mx/include/"^
main.c
Der Ausgang dann gibt
< Location unknown >: Field name reused:
Code cannot be parsed. For help on parse errors, see splint -help
parseerrors. (Use -syntax to inhibit warning)
< Location unknown >: Previous use of
< Location unknown >: Previous use of
.... approx 100 times then...
C:\Program Files (x86)\Microchip\xc32\v1.40\pic32mx\include\\stddef.h(4,18):
Datatype ptrdiff_t declared with inconsistent type: long int
A function, variable or constant is redefined with a different type. (Use
-incondefs to inhibit warning)
load file standard.lcd: Specification of ptrdiff_t: arbitrary integral type
C:\Program Files (x86)\Microchip\xc32\v1.40\pic32mx\include\\stddef.h(5,27):
Datatype size_t declared with inconsistent type: unsigned long int
load file standard.lcd: Specification of size_t:
arbitrary unsigned integral type
C:\Program Files (x86)\Microchip\xc32\v1.40\pic32mx\include\\stddef.h(6,13):
Datatype wchar_t declared with inconsistent type: int
load file standard.lcd: Specification of wchar_t: arbitrary integral type
C:\Program Files (x86)\Microchip\xc32\v1.40\pic32mx\include\\stdarg.h(75,36):
No type before declaration name (implicit int type): __builtin_va_list :
int
A variable declaration has no explicit type. The type is implicitly int.
(Use -imptype to inhibit warning)
C:\Program Files (x86)\Microchip\xc32\v1.40\pic32mx\include\\stdarg.h(75,36):
Parse Error: Suspect missing struct or union keyword: __builtin_va_list :
int. (For help on parse errors, see splint -help parseerrors.)
*** Cannot continue.
Die letzte verursacht Dinge zu stoppen. Ich habe Dinge wie -skip-iso-Header ohne Glück versucht. Es scheint, es wird Probleme mit seiner standard.lcd-Datei und die xc32 std Dateien sehen
Kann mir jemand sagen
- Was die
< Location unknown >: Field name reused:
Mittel oder möglicherweise bezieht? - Eine Möglichkeit, den Parse-Fehler aufgrund der Std-Header-Dateien zu lösen?
Bis jetzt nur Möglichkeit, das Headerdateiproblem zu lösen, ist, die Typen zu definieren, z.
-D"__builtin_va_list"=int^
editierte Frage ein Weg, um vorbei an den Parse-Fehler – spitz