Skip to content

Commit

Permalink
🛠 Get around read access warning in GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePhD committed Nov 8, 2021
1 parent b39e16d commit 54c39c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion include/ztd/idk/c_span.g.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ ZTD_C_STRUCT_LINKAGE_I_ typedef struct ZTD_IDK_C_SPAN_FULL_NAME_I_ {
ZTD_C_FUNCTION_LINKAGE_I_ ZTD_C_FUNCTION_INLINE_I_ void ZTD_IDK_C_SPAN_PREFIX_I_(copy_)(
ZTD_IDK_C_SPAN_FULL_NAME_I_* __destination, ZTD_IDK_C_SPAN_FULL_NAME_I_ __source) {
ZTD_ASSERT_MESSAGE_I_("the destination parameter must not be null", __destination != NULL);
memcpy(__destination, &__source, sizeof(__source));
(*(ZTD_IDK_C_SPAN_CONST_TYPE_I_**)&__destination->data) = __source.data;
(*(ZTD_IDK_C_SPAN_SIZE_TYPE_I_*)&__destination->size) = __source.size;
}

ZTD_C_FUNCTION_LINKAGE_I_ ZTD_C_FUNCTION_INLINE_I_ ZTD_IDK_C_SPAN_FULL_NAME_I_ ZTD_IDK_C_SPAN_PREFIX_I_(make_)(
Expand Down
4 changes: 2 additions & 2 deletions include/ztd/version/detail/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@
// Building the library
#if ZTD_IS_ON(ZTD_COMPILER_GCC_I_)
// Using GCC
#define ZTD_API_LINKAGE_I_ __attribute__(dllexport )
#define ZTD_API_LINKAGE_I_ __attribute__((dllexport))
#else
// Using Clang, MSVC, etc...
#define ZTD_API_LINKAGE_I_ __declspec(dllexport)
#endif
#else
#if ZTD_IS_ON(ZTD_COMPILER_GCC_I_)
#define ZTD_API_LINKAGE_I_ __attribute__(dllimport)
#define ZTD_API_LINKAGE_I_ __attribute__((dllimport))
#else
#define ZTD_API_LINKAGE_I_ __declspec(dllimport)
#endif
Expand Down

0 comments on commit 54c39c7

Please sign in to comment.