[RTEMS Project] #4845: Global variable declared/defined in the wrong file

RTEMS trac trac at rtems.org
Thu Feb 9 14:53:20 UTC 2023


#4845: Global variable declared/defined in the wrong file
----------------------------+---------------------------
  Reporter:  Daniel Páscoa  |      Owner:  (none)
      Type:  defect         |     Status:  new
  Priority:  normal         |  Milestone:
 Component:  admin          |    Version:  6
  Severity:  normal         |   Keywords:  qualification
Blocked By:                 |   Blocking:
----------------------------+---------------------------
 This source file contains both declaration and definition of the variable.
 It is recommended to declare global variables in a header file and define
 them in separate source files. Please consider this best practice and move
 the declarations to a header file and corresponding definitions to
 respective source files.

 **Additional Notes:**
 LEON3_Boot_Cpu is a global variable and only used by start.S file. And as
 such cannot be declared as static. Because is used in an assembly file
 there was no need to declare it as external. But the global variable is in
 fact declared and defined in same file.

 This ticket was raised as an outcome of the Independent SW Verification
 and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs
 (https://rtems-qual.io.esa.int). Original ISVV reference for this issue is
 RTEMS-SMP-CODE-VER-043.

 **File list:**
 bsps\sparc\leon3\start\bspstart.c (line 54)

--
Ticket URL: <http://devel.rtems.org/ticket/4845>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list