Skip to content

Commit

Permalink
In eez-flow.h, fix compile error on GCC when "-Wdangling-pointer=1" i…
Browse files Browse the repository at this point in the history
…s enabled
  • Loading branch information
mvladic committed Nov 15, 2024
1 parent 5f4a0ea commit b5848b0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/project-editor/flow/runtime/cpp/eez-framework
2 changes: 1 addition & 1 deletion resources/eez-framework-amalgamation/eez-flow.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Autogenerated on November 7, 2024 10:25:35 AM from eez-framework commit 129db029d6fc4fdd1086fc8f836d72feed469d54 */
/* Autogenerated on November 15, 2024 4:22:16 PM from eez-framework commit 83b926fbd2f39af0eb6460b1cc38e289a5dd6432 */
/*
* eez-framework
*
Expand Down
12 changes: 11 additions & 1 deletion resources/eez-framework-amalgamation/eez-flow.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Autogenerated on November 7, 2024 10:25:35 AM from eez-framework commit 129db029d6fc4fdd1086fc8f836d72feed469d54 */
/* Autogenerated on November 15, 2024 4:22:16 PM from eez-framework commit 83b926fbd2f39af0eb6460b1cc38e289a5dd6432 */
/*
* eez-framework
*
Expand Down Expand Up @@ -1040,12 +1040,22 @@ struct Value {
type = VALUE_TYPE_STRING;
unit = 0;
options = 0;
#pragma GCC diagnostic push
#if !defined(__has_warning) || __has_warning("-Wdangling-pointer")
#pragma GCC diagnostic ignored "-Wdangling-pointer=1"
#endif
strValue = (const char *)((uint8_t *)&value.int32Value + value.int32Value);
#pragma GCC diagnostic pop
} else if (value.type == VALUE_TYPE_ARRAY_ASSET) {
type = VALUE_TYPE_ARRAY;
unit = 0;
options = 0;
#pragma GCC diagnostic push
#if !defined(__has_warning) || __has_warning("-Wdangling-pointer")
#pragma GCC diagnostic ignored "-Wdangling-pointer=1"
#endif
arrayValue = (ArrayValue *)((uint8_t *)&value.int32Value + value.int32Value);
#pragma GCC diagnostic pop
} else {
type = value.type;
unit = value.unit;
Expand Down

0 comments on commit b5848b0

Please sign in to comment.