[Cryptech-Commits] [sw/stm32] 02/08: Silence deprecated warnings in CMSIS code.
git at cryptech.is
git at cryptech.is
Thu Oct 15 22:22:11 UTC 2020
This is an automated email from the git hooks/post-receive script.
paul at psgd.org pushed a commit to branch master
in repository sw/stm32.
commit 7a08cec524254574013e1839507514bf30085201
Author: Paul Selkirk <paul at psgd.org>
AuthorDate: Thu Oct 15 13:40:39 2020 -0400
Silence deprecated warnings in CMSIS code.
---
projects/bootloader/bootloader.c | 21 ++++++++++++++++++---
task.c | 20 +++++++++++++++++---
2 files changed, 35 insertions(+), 6 deletions(-)
diff --git a/projects/bootloader/bootloader.c b/projects/bootloader/bootloader.c
index c62df12..6413597 100644
--- a/projects/bootloader/bootloader.c
+++ b/projects/bootloader/bootloader.c
@@ -5,6 +5,8 @@
* or jump to previously installed firmware.
*
* Copyright (c) 2016, NORDUnet A/S All rights reserved.
+ * Copyright: 2020, The Commons Conservancy Cryptech Project
+ * SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -16,9 +18,9 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * - Neither the name of the NORDUnet nor the names of its contributors may
- * be used to endorse or promote products derived from this software
- * without specific prior written permission.
+ * - Neither the name of the copyright holder nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -32,6 +34,19 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
+/* Ignore "deprecated" warnings in ARM-supplied CMSIS code:
+ *
+ * libraries/mbed/targets/cmsis/core_cm4.h:85:28: warning: listing the stack pointer register 'sp' in a clobber list is deprecated
+ * libraries/mbed/targets/cmsis/core_cm4.h:85:28: note: the value of the stack pointer after an 'asm' statement must be the same as it was before the statement
+ *
+ * This comes from our use of __set_MSP to set the stack pointer when
+ * switching tasks. If GCC ever decides to actually forbid this, then
+ * we'll have to figure out something else, possibly a native assembly
+ * function.
+ */
+#pragma GCC diagnostic ignored "-Wdeprecated"
+
#include "stm-init.h"
#include "stm-led.h"
#include "stm-uart.h"
diff --git a/task.c b/task.c
index 34daa24..adb845b 100644
--- a/task.c
+++ b/task.c
@@ -4,6 +4,8 @@
* Simple cooperative tasking system.
*
* Copyright (c) 2017, NORDUnet A/S All rights reserved.
+ * Copyright: 2020, The Commons Conservancy Cryptech Project
+ * SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -15,9 +17,9 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * - Neither the name of the NORDUnet nor the names of its contributors may
- * be used to endorse or promote products derived from this software
- * without specific prior written permission.
+ * - Neither the name of the copyright holder nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -39,6 +41,18 @@
* tasks deleted.
*/
+/* Ignore "deprecated" warnings in ARM-supplied CMSIS code:
+ *
+ * libraries/mbed/targets/cmsis/core_cm4.h:85:28: warning: listing the stack pointer register 'sp' in a clobber list is deprecated
+ * libraries/mbed/targets/cmsis/core_cm4.h:85:28: note: the value of the stack pointer after an 'asm' statement must be the same as it was before the statement
+ *
+ * This comes from our use of __set_MSP to set the stack pointer when
+ * switching tasks. If GCC ever decides to actually forbid this, then
+ * we'll have to figure out something else, possibly a native assembly
+ * function.
+ */
+#pragma GCC diagnostic ignored "-Wdeprecated"
+
#include "stm-init.h"
#include "task.h"
More information about the Commits
mailing list