diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2025-01-12 14:23:01 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2025-01-12 14:23:01 (GMT) |
commit | baa854bfcc969022a00617b58a661e37f345cab5 (patch) | |
tree | 093d3ace4c2e1ad8fa37ce5e08723f768fffbada /src/common/compiler.h | |
parent | 0fdba5bd3e2c9ed913619990dbda7925867e46c5 (diff) |
Rewrite the plugin system.
Diffstat (limited to 'src/common/compiler.h')
-rw-r--r-- | src/common/compiler.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/common/compiler.h b/src/common/compiler.h index 2585e47..65df8a4 100644 --- a/src/common/compiler.h +++ b/src/common/compiler.h @@ -2,7 +2,7 @@ /* Chrysalide - Outil d'analyse de fichiers binaires * compiler.h - prototypes pour le regroupement d'astuces à destination du compilateur * - * Copyright (C) 2024 Cyrille Bagard + * Copyright (C) 2024-2025 Cyrille Bagard * * This file is part of Chrysalide. * @@ -34,5 +34,19 @@ #define __weak __attribute__((weak)) +/** + * Contournement des avertissements de la forme suivante : + * + * assignment to 'const char * const*' from incompatible pointer type 'char **' [-Wincompatible-pointer-types] + * + * Références : + * - https://www.reddit.com/r/C_Programming/comments/qa2231/const_char_const_and_char_are_incompatible/ + * - https://stackoverflow.com/questions/78125/why-cant-i-convert-char-to-a-const-char-const-in-c + * - https://c-faq.com/ansi/constmismatch.html + */ + +#define CONST_ARRAY_CAST(a, tp) (const tp **)a + + #endif /* _COMMON_COMPILER_H */ |