kopia lustrzana https://github.com/espressif/esp-idf
ci: Add IDF_DEPRECATED macro for things we only deprecate in our CI passes
rodzic
897bb55482
commit
b2e54a9cc6
|
@ -84,4 +84,13 @@
|
|||
|
||||
#define _COUNTER_STRINGIFY(COUNTER) #COUNTER
|
||||
|
||||
/* Use IDF_DEPRECATED attribute to mark anything deprecated from use in
|
||||
ESP-IDF's own source code, but not deprecated for external users.
|
||||
*/
|
||||
#ifdef IDF_CI_BUILD
|
||||
#define IDF_DEPRECATED(REASON) __attribute__((deprecated(REASON)))
|
||||
#else
|
||||
#define IDF_DEPRECATED(REASON)
|
||||
#endif
|
||||
|
||||
#endif /* __ESP_ATTR_H__ */
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include "esp_attr.h"
|
||||
#include "esp_err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -31,7 +32,7 @@ typedef uint32_t nvs_handle_t;
|
|||
/*
|
||||
* Pre-IDF V4.0 uses nvs_handle, so leaving the original typedef here for compatibility.
|
||||
*/
|
||||
typedef nvs_handle_t nvs_handle;
|
||||
typedef nvs_handle_t nvs_handle IDF_DEPRECATED("Replace with nvs_handle_t");
|
||||
|
||||
#define ESP_ERR_NVS_BASE 0x1100 /*!< Starting number of error codes */
|
||||
#define ESP_ERR_NVS_NOT_INITIALIZED (ESP_ERR_NVS_BASE + 0x01) /*!< The storage driver is not initialized */
|
||||
|
@ -74,7 +75,7 @@ typedef enum {
|
|||
/*
|
||||
* Pre-IDF V4.0 uses nvs_open_mode, so leaving the original typedef here for compatibility.
|
||||
*/
|
||||
typedef nvs_open_mode_t nvs_open_mode
|
||||
typedef nvs_open_mode_t nvs_open_mode IDF_DEPRECATED("Replace with nvs_open_mode_t");
|
||||
|
||||
typedef enum {
|
||||
NVS_TYPE_U8 = 0x01,
|
||||
|
|
|
@ -232,6 +232,7 @@ MACRO_EXPANSION = YES
|
|||
EXPAND_ONLY_PREDEF = YES
|
||||
PREDEFINED = \
|
||||
__attribute__(x)= \
|
||||
IDF_DEPRECATED(X)= \
|
||||
IRAM_ATTR= \
|
||||
configSUPPORT_DYNAMIC_ALLOCATION=1 \
|
||||
configSUPPORT_STATIC_ALLOCATION=1 \
|
||||
|
|
|
@ -33,4 +33,4 @@ unset REF
|
|||
|
||||
# Compiler flags to thoroughly check the IDF code in some CI jobs
|
||||
# (Depends on default options '-Wno-error=XXX' used in the IDF build system)
|
||||
export PEDANTIC_CFLAGS="-Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
|
||||
export PEDANTIC_CFLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
|
||||
|
|
Ładowanie…
Reference in New Issue