|
From: openocd-gerrit <ope...@us...> - 2023-05-18 10:08:27
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via e17fe4db0f256ee4fb97dcfd6b9f7f55c966b190 (commit)
via 177bafd4cccf505df0d02ace0d235af78cac4d8a (commit)
from 20005eb81abaa3d191d6cdf36fd6f3d4e48a1db7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e17fe4db0f256ee4fb97dcfd6b9f7f55c966b190
Author: Antonio Borneo <bor...@gm...>
Date: Mon May 1 00:29:11 2023 +0200
pld: validate exported functions by including its own .h
Let source files to include its file .h to validate the exported
prototypes.
Detected through 'sparse' tool.
Change-Id: I217c2903fdb19e1a2cce39d2536a903c3d72f3f7
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7664
Tested-by: jenkins
diff --git a/src/pld/certus.c b/src/pld/certus.c
index 692ea1907..1309c1b27 100644
--- a/src/pld/certus.c
+++ b/src/pld/certus.c
@@ -9,6 +9,7 @@
#include "config.h"
#endif
+#include "certus.h"
#include "lattice.h"
#include "lattice_cmd.h"
diff --git a/src/pld/ecp2_3.c b/src/pld/ecp2_3.c
index 6826d0b4a..b1c2833d5 100644
--- a/src/pld/ecp2_3.c
+++ b/src/pld/ecp2_3.c
@@ -9,6 +9,7 @@
#include "config.h"
#endif
+#include "ecp2_3.h"
#include "lattice.h"
#define LSCC_REFRESH 0x23
diff --git a/src/pld/ecp5.c b/src/pld/ecp5.c
index 298b55f4e..2e1009baa 100644
--- a/src/pld/ecp5.c
+++ b/src/pld/ecp5.c
@@ -9,6 +9,7 @@
#include "config.h"
#endif
+#include "ecp5.h"
#include "lattice.h"
#include "lattice_cmd.h"
commit 177bafd4cccf505df0d02ace0d235af78cac4d8a
Author: Antonio Borneo <bor...@gm...>
Date: Mon May 1 00:24:37 2023 +0200
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 <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7663
Tested-by: jenkins
diff --git a/src/pld/pld.c b/src/pld/pld.c
index dd8f8263f..7dd2cec18 100644
--- a/src/pld/pld.c
+++ b/src/pld/pld.c
@@ -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,
diff --git a/src/pld/pld.h b/src/pld/pld.h
index a7cd20f64..322b96ec6 100644
--- a/src/pld/pld.h
+++ b/src/pld/pld.h
@@ -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 */
-----------------------------------------------------------------------
Summary of changes:
src/pld/certus.c | 1 +
src/pld/ecp2_3.c | 1 +
src/pld/ecp5.c | 1 +
src/pld/pld.c | 9 ---------
src/pld/pld.h | 7 +++++++
5 files changed, 10 insertions(+), 9 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|