mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 09:00:51 +02:00
replace several nonconformant uses of __FUNCTION__ with __func__ (linuxkm/linuxkm_memory.c, wolfcrypt/src/random.c, wolfcrypt/test/test.c, wolfssl/wolfcrypt/mem_track.h, wolfssl/wolfcrypt/memory.h, wolfssl/wolfcrypt/settings.h).
This commit is contained in:
@@ -82,7 +82,7 @@ static inline long find_reloc_tab_offset(
|
||||
unsigned long hop;
|
||||
|
||||
if (seg_in_offset >= (size_t)reloc_tab[reloc_tab_len - 1].offset) {
|
||||
RELOC_DEBUG_PRINTF("ERROR: %s failed.\n", __FUNCTION__);
|
||||
RELOC_DEBUG_PRINTF("ERROR: %s failed.\n", __func__);
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ static inline long find_reloc_tab_offset(
|
||||
|
||||
#ifdef DEBUG_LINUXKM_PIE_SUPPORT
|
||||
if (ret < 0)
|
||||
RELOC_DEBUG_PRINTF("ERROR: %s returning %ld.\n", __FUNCTION__, ret);
|
||||
RELOC_DEBUG_PRINTF("ERROR: %s returning %ld.\n", __func__, ret);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
@@ -176,7 +176,7 @@ ssize_t wc_reloc_normalize_segment(
|
||||
else
|
||||
{
|
||||
RELOC_DEBUG_PRINTF("ERROR: %s returning BAD_FUNC_ARG with span %llx-%llx versus text %llx-%llx and rodata %llx-%llx.\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
(unsigned long long)(uintptr_t)seg_in,
|
||||
(unsigned long long)(uintptr_t)(seg_in + *seg_in_out_len),
|
||||
(unsigned long long)seg_map->text_start,
|
||||
|
||||
@@ -555,7 +555,7 @@ static int Hash_df(DRBG_internal* drbg, byte* out, word32 outSz, byte type,
|
||||
|
||||
#ifdef WC_VERBOSE_RNG
|
||||
if (ret != 0)
|
||||
WOLFSSL_DEBUG_PRINTF("ERROR: %s failed with err = %d", __FUNCTION__,
|
||||
WOLFSSL_DEBUG_PRINTF("ERROR: %s failed with err = %d", __func__,
|
||||
ret);
|
||||
#endif
|
||||
|
||||
@@ -1148,7 +1148,7 @@ static int Hash512_df(DRBG_SHA512_internal* drbg, byte* out, word32 outSz,
|
||||
|
||||
#ifdef WC_VERBOSE_RNG
|
||||
if (ret != 0)
|
||||
WOLFSSL_DEBUG_PRINTF("ERROR: %s failed with err = %d", __FUNCTION__,
|
||||
WOLFSSL_DEBUG_PRINTF("ERROR: %s failed with err = %d", __func__,
|
||||
ret);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1127,7 +1127,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_cts_test(void);
|
||||
do { \
|
||||
ret = (err); \
|
||||
ESP_LOGE(ESPIDF_TAG, "Failed: Error = %d during %s, line %d", \
|
||||
err, __FUNCTION__, __LINE__); \
|
||||
err, __func__, __LINE__); \
|
||||
ESP_LOGI(ESPIDF_TAG, "Extended system info:"); \
|
||||
esp_ShowExtendedSystemInfo(); \
|
||||
ESP_LOGW(ESPIDF_TAG, "Paused for %d seconds! " \
|
||||
|
||||
@@ -728,7 +728,7 @@ int StackSizeHWMReset(void)
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define STACK_SIZE_INIT() \
|
||||
(void)StackSizeSetOffset(__FUNCTION__, __builtin_frame_address(0))
|
||||
(void)StackSizeSetOffset(__func__, __builtin_frame_address(0))
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_STACK_SIZE_VERBOSE */
|
||||
|
||||
@@ -382,7 +382,7 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
|
||||
fprintf(stderr, \
|
||||
("%s() %s @ L %d : incr : " \
|
||||
"wc_svr_count %d (last op %s L %d)\n"), \
|
||||
__FUNCTION__, \
|
||||
__func__, \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
wc_svr_count, \
|
||||
@@ -405,7 +405,7 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
|
||||
fprintf(stderr, \
|
||||
("%s() %s @ L %d : incr : " \
|
||||
"wc_svr_count %d (last op %s L %d)\n"), \
|
||||
__FUNCTION__, \
|
||||
__func__, \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
wc_svr_count, \
|
||||
@@ -460,7 +460,7 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
|
||||
fprintf(stderr, \
|
||||
("%s() %s @ L %d : incr : " \
|
||||
"wc_svr_count %d (last op %s L %d)\n"), \
|
||||
__FUNCTION__, \
|
||||
__func__, \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
wc_svr_count, \
|
||||
@@ -475,7 +475,7 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
|
||||
fprintf(stderr, \
|
||||
("%s() %s @ L %d : incr : " \
|
||||
"wc_svr_count %d (last op %s L %d)\n"), \
|
||||
__FUNCTION__, \
|
||||
__func__, \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
wc_svr_count, \
|
||||
@@ -497,7 +497,7 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
|
||||
fprintf(stderr, \
|
||||
("ASSERT_SAVED_VECTOR_REGISTERS : %s() %s @ L %d : " \
|
||||
"wc_svr_count %d (last op %s L %d)\n"), \
|
||||
__FUNCTION__, \
|
||||
__func__, \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
wc_svr_count, \
|
||||
@@ -511,7 +511,7 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
|
||||
fprintf(stderr, \
|
||||
("ASSERT_RESTORED_VECTOR_REGISTERS : %s() %s @ L %d" \
|
||||
" : wc_svr_count %d (last op %s L %d)\n"), \
|
||||
__FUNCTION__, \
|
||||
__func__, \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
wc_svr_count, \
|
||||
@@ -527,7 +527,7 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
|
||||
fprintf(stderr, \
|
||||
("%s() %s @ L %d : decr : " \
|
||||
"wc_svr_count %d (last op %s L %d)\n"), \
|
||||
__FUNCTION__, \
|
||||
__func__, \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
wc_svr_count, \
|
||||
|
||||
@@ -1641,14 +1641,14 @@
|
||||
#if (defined(DEBUG_WOLFSSL) || defined(DEBUG_WOLFSSL_MALLOC))
|
||||
#define XMALLOC(s, h, type) \
|
||||
((void)(h), (void)(type), wc_debug_pvPortMalloc( \
|
||||
(s), (__FILE__), (__LINE__), (__FUNCTION__) ))
|
||||
s, __FILE__, __LINE__, __func__))
|
||||
#else
|
||||
#define XMALLOC(s, h, type) \
|
||||
((void)(h), (void)(type), wc_pvPortMalloc((s))) /* native heap */
|
||||
((void)(h), (void)(type), wc_pvPortMalloc(s)) /* native heap */
|
||||
#endif
|
||||
#else
|
||||
#define XMALLOC(s, h, type) \
|
||||
((void)(h), (void)(type), pvPortMalloc((s))) /* native heap */
|
||||
((void)(h), (void)(type), pvPortMalloc(s)) /* native heap */
|
||||
#endif
|
||||
|
||||
/* XFREE */
|
||||
@@ -1656,14 +1656,14 @@
|
||||
#if (defined(DEBUG_WOLFSSL) || defined(DEBUG_WOLFSSL_MALLOC))
|
||||
#define XFREE(p, h, type) \
|
||||
((void)(h), (void)(type), wc_debug_pvPortFree( \
|
||||
(p), (__FILE__), (__LINE__), (__FUNCTION__) ))
|
||||
p, __FILE__, __LINE__, __func__))
|
||||
#else
|
||||
#define XFREE(p, h, type) \
|
||||
((void)(h), (void)(type), wc_pvPortFree((p)))
|
||||
((void)(h), (void)(type), wc_pvPortFree(p))
|
||||
#endif
|
||||
#else
|
||||
#define XFREE(p, h, type) \
|
||||
((void)(h), (void)(type), vPortFree((p))) /* native heap */
|
||||
((void)(h), (void)(type), vPortFree(p)) /* native heap */
|
||||
#endif
|
||||
|
||||
/* XREALLOC */
|
||||
@@ -1671,19 +1671,19 @@
|
||||
#if (defined(DEBUG_WOLFSSL) || defined(DEBUG_WOLFSSL_MALLOC))
|
||||
#define XREALLOC(p, n, h, t) \
|
||||
((void)(h), (void)(t), wc_debug_pvPortRealloc( \
|
||||
(p), (n),(__FILE__), (__LINE__), (__FUNCTION__) ))
|
||||
p, n, __FILE__, __LINE__, __func__))
|
||||
#else
|
||||
/* In the Espressif EDP-IDF, realloc(p, n) is equivalent to
|
||||
* heap_caps_realloc(p, s, MALLOC_CAP_8BIT)
|
||||
* There's no pvPortRealloc available, use native heap: */
|
||||
#define XREALLOC(p, n, h, t) \
|
||||
((void)(h), (void)(t), wc_pvPortRealloc((p), (n)))
|
||||
((void)(h), (void)(t), wc_pvPortRealloc(p, n))
|
||||
#endif
|
||||
#elif defined(USE_INTEGER_HEAP_MATH) || defined(OPENSSL_EXTRA) || \
|
||||
defined(OPENSSL_ALL)
|
||||
/* FreeRTOS pvPortRealloc() implementation can be found here:
|
||||
* https://github.com/wolfSSL/wolfssl-freertos/pull/3/files */
|
||||
#define XREALLOC(p, n, h, t) ((void)(h), (void)(t), pvPortRealloc((p), (n)))
|
||||
#define XREALLOC(p, n, h, t) ((void)(h), (void)(t), pvPortRealloc(p, n))
|
||||
#else
|
||||
/* no XREALLOC available */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user