pld: move in pld.h the pld_driver's declaration

The static analyser 'sparse' complains, while compiling a pld
driver, that the struct pld_driver is declared in the file as
non static, but it is not exposed through an include file.
The message is:
	warning: symbol 'XXX' was not declared. Should it be static?

Move the list of pld_driver's declaration in pld.h

Change-Id: I0f917aecc7534c1b51af0afa9b32ccfd33db3511
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7663
Tested-by: jenkins
This commit is contained in:
Antonio Borneo 2023-05-01 00:24:37 +02:00
parent 20005eb81a
commit 177bafd4cc
2 changed files with 7 additions and 9 deletions

View File

@ -16,15 +16,6 @@
#include <helper/time_support.h>
/* pld drivers
*/
extern struct pld_driver efinix_pld;
extern struct pld_driver gatemate_pld;
extern struct pld_driver gowin_pld;
extern struct pld_driver intel_pld;
extern struct pld_driver lattice_pld;
extern struct pld_driver virtex2_pld;
static struct pld_driver *pld_drivers[] = {
&efinix_pld,
&gatemate_pld,

View File

@ -38,4 +38,11 @@ struct pld_device *get_pld_device_by_num(int num);
#define ERROR_PLD_DEVICE_INVALID (-1000)
#define ERROR_PLD_FILE_LOAD_FAILED (-1001)
extern struct pld_driver efinix_pld;
extern struct pld_driver gatemate_pld;
extern struct pld_driver gowin_pld;
extern struct pld_driver intel_pld;
extern struct pld_driver lattice_pld;
extern struct pld_driver virtex2_pld;
#endif /* OPENOCD_PLD_PLD_H */