This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new 39f2b738c9 fix: Worked on resolving all warnings on Mac & Linux to
hopefully fix the Windows PLC4C build (Not finished yet)
39f2b738c9 is described below
commit 39f2b738c9b36ef1e9d4d57ea3f81aebb9cabcc9
Author: Christofer Dutz <[email protected]>
AuthorDate: Thu Sep 18 23:46:48 2025 +0200
fix: Worked on resolving all warnings on Mac & Linux to hopefully fix the
Windows PLC4C build (Not finished yet)
---
.../org/apache/plc4x/language/c/CLanguageTemplateHelper.java | 4 ++--
.../main/resources/templates/c/complex-type-template.c.ftlh | 4 ++--
.../c/src/main/resources/templates/c/enum-template.c.ftlh | 1 +
plc4c/drivers/modbus/include/plc4c/driver_modbus_packets.h | 2 +-
plc4c/drivers/s7/src/driver_s7_packets.c | 6 ++++++
plc4c/generated-sources/modbus/src/data_item.c | 4 ++--
plc4c/generated-sources/plc4x/src/plc4x_message.c | 2 +-
plc4c/generated-sources/plc4x/src/plc4x_tag.c | 4 ++--
plc4c/generated-sources/plc4x/src/plc4x_value.c | 4 ++--
plc4c/generated-sources/s7/src/data_item.c | 4 ++--
plc4c/generated-sources/s7/src/memory_area.c | 1 +
plc4c/generated-sources/s7/src/s7_payload_user_data_item.c | 6 +++---
plc4c/generated-sources/s7/src/transport_size.c | 1 +
plc4c/spi/include/plc4c/spi/write_buffer.h | 2 +-
plc4c/spi/src/data.c | 2 +-
plc4c/spi/src/write_buffer.c | 10 +++++-----
plc4c/spi/test/write_buffer_test.c | 8 ++++----
plc4c/tools/plc4x-server/src/plc4x_server.c | 4 ++++
.../main/generated/protocols/knxnetip/knx-master-data.mspec | 5 +++--
19 files changed, 44 insertions(+), 30 deletions(-)
diff --git
a/code-generation/language/c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
b/code-generation/language/c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
index 549daea7bf..ef6538847b 100644
---
a/code-generation/language/c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
+++
b/code-generation/language/c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
@@ -573,7 +573,7 @@ public class CLanguageTemplateHelper extends
BaseFreemarkerLanguageTemplateHelpe
String encoding = ((StringLiteral) encodingTerm).getValue();
String length =
Integer.toString(simpleTypeReference.getSizeInBits());
return "plc4c_spi_write_string(writeBuffer, " + length + ",
\"" +
- encoding + "\", (char*) " + fieldName + ")";
+ encoding + "\", (const uint8_t*) " + fieldName + ")";
}
case VSTRING: {
final Term encodingTerm = field.getEncoding().orElse(new
DefaultStringLiteral("UTF-8"));
@@ -584,7 +584,7 @@ public class CLanguageTemplateHelper extends
BaseFreemarkerLanguageTemplateHelpe
// Here we need to use the serialized expression of the length
instead.
String lengthExpression = toSerializationExpression(thisType,
field,
simpleTypeReference.asVstringTypeReference().orElseThrow().getLengthExpression(),
null);
return "plc4c_spi_write_string(writeBuffer, " +
lengthExpression + ", \"" +
- encoding + "\", " + fieldName + ")";
+ encoding + "\", (const uint8_t*) " + fieldName + ")";
}
default:
throw new FreemarkerException("Unsupported type " +
simpleTypeReference.getBaseType().name());
diff --git
a/code-generation/language/c/src/main/resources/templates/c/complex-type-template.c.ftlh
b/code-generation/language/c/src/main/resources/templates/c/complex-type-template.c.ftlh
index be0333c5c5..42e7e012c2 100644
---
a/code-generation/language/c/src/main/resources/templates/c/complex-type-template.c.ftlh
+++
b/code-generation/language/c/src/main/resources/templates/c/complex-type-template.c.ftlh
@@ -324,7 +324,7 @@ plc4c_return_code
${helper.getCTypeName(type.name)}_parse(plc4x_spi_context ctx,
_res = ${helper.getReadBufferReadMethodCall(simpleTypeReference,
optionalField.name, optionalField)};
<#else>
<#assign nonSimpleTypeReference =
optionalField.type.asNonSimpleTypeReference().orElseThrow()>
- _res = ${helper.getCTypeName(nonSimpleTypeReference.name)}_parse(ctx,
readBuffer<#if optionalField.type.isNonSimpleTypeReference() &&
optionalField.type.asNonSimpleTypeReference().get().getParams().isPresent()>,
<#list optionalField.type.asNonSimpleTypeReference().get().getParams().get() as
parserTerm>${helper.toParseExpression(baseType, optionalField, parserTerm,
parserArguments)}<#sep>, </#sep></#list></#if>, &${optionalField.name});
+ _res = ${helper.getCTypeName(nonSimpleTypeReference.name)}_parse(ctx,
readBuffer<#if optionalField.type.isNonSimpleTypeReference() &&
optionalField.type.asNonSimpleTypeReference().get().getParams().isPresent()>,
<#list optionalField.type.asNonSimpleTypeReference().get().getParams().get() as
parserTerm>${helper.toParseExpression(baseType, optionalField, parserTerm,
parserArguments)}<#sep>, </#sep></#list></#if>, <#if
!optionalField.type.isEnumTypeReference()>&</#if>${optionalField.name});
</#if>
if(_res != OK) {
return _res;
@@ -560,7 +560,7 @@ plc4c_return_code
${helper.getCTypeName(type.name)}_serialize(plc4x_spi_context
<#if optionalField.type.isSimpleTypeReference()>
_res =
${helper.getWriteBufferWriteMethodCall(optionalField.type.asSimpleTypeReference().orElseThrow(),
"*_message->" + helper.getFieldName(baseType, optionalField), optionalField)};
<#else>
- _res =
${helper.getCTypeName(optionalField.type.asNonSimpleTypeReference().orElseThrow().name)}_serialize(ctx,
writeBuffer<#if optionalField.type.isDataIoTypeReference() &&
optionalField.type.asNonSimpleTypeReference().get().getParams().isPresent()>,
<#list optionalField.type.asNonSimpleTypeReference().get().getParams().get() as
parserTerm>${helper.toSerializationExpression(baseType, optionalField,
parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, <#if
optionalField.type.is [...]
+ _res =
${helper.getCTypeName(optionalField.type.asNonSimpleTypeReference().orElseThrow().name)}_serialize(ctx,
writeBuffer<#if optionalField.type.isDataIoTypeReference() &&
optionalField.type.asNonSimpleTypeReference().get().getParams().isPresent()>,
<#list optionalField.type.asNonSimpleTypeReference().get().getParams().get() as
parserTerm>${helper.toSerializationExpression(baseType, optionalField,
parserTerm, parserArguments)}<#sep>, </#sep></#list></#if>, <#if
optionalField.type.is [...]
</#if>
if(_res != OK) {
return _res;
diff --git
a/code-generation/language/c/src/main/resources/templates/c/enum-template.c.ftlh
b/code-generation/language/c/src/main/resources/templates/c/enum-template.c.ftlh
index fd0fcfaafe..774980c3ab 100644
---
a/code-generation/language/c/src/main/resources/templates/c/enum-template.c.ftlh
+++
b/code-generation/language/c/src/main/resources/templates/c/enum-template.c.ftlh
@@ -162,6 +162,7 @@ ${helper.getCTypeName(type.name)}
${helper.getCTypeName(type.name)}_get_first_en
return ${helper.getCTypeName(type.name)}_${enumValue.name};
}
</#list>
+ return (${helper.getCTypeName(type.name)}) 0;
<#elseif constantType.isBooleanTypeReference()>
if (!value) {
<#assign enumValue=uniqueEnumValues[0]>
diff --git a/plc4c/drivers/modbus/include/plc4c/driver_modbus_packets.h
b/plc4c/drivers/modbus/include/plc4c/driver_modbus_packets.h
index c66dbbc61b..bdad48d4e2 100644
--- a/plc4c/drivers/modbus/include/plc4c/driver_modbus_packets.h
+++ b/plc4c/drivers/modbus/include/plc4c/driver_modbus_packets.h
@@ -39,7 +39,7 @@ plc4c_return_code
plc4c_driver_modbus_create_modbus_read_request(
plc4c_item* read_request_item,
plc4c_modbus_read_write_modbus_adu** modbus_read_request_packet);
plc4c_return_code plc4c_driver_modbus_create_modbus_write_request(
- plc4c_driver_modbus_item* write_request_item,
+ plc4c_write_request* write_request,
plc4c_modbus_read_write_modbus_adu** modbus_read_request_packet);
#ifdef __cplusplus
diff --git a/plc4c/drivers/s7/src/driver_s7_packets.c
b/plc4c/drivers/s7/src/driver_s7_packets.c
index 3c679190a7..60ec5d0093 100644
--- a/plc4c/drivers/s7/src/driver_s7_packets.c
+++ b/plc4c/drivers/s7/src/driver_s7_packets.c
@@ -331,6 +331,9 @@ void plc4c_driver_s7_destroy_receive_packet(
// TODO: something
//just num of items so nothing to do
break;
+ default:
+ // No specific cleanup required for other parameter types at this
time
+ break;
}
free(s7_param);
}
@@ -977,5 +980,8 @@ void
plc4c_driver_s7_time_transport_size(plc4c_s7_read_write_transport_size *tra
case plc4c_s7_read_write_transport_size_TIME_OF_DAY:
*transport_size = plc4c_s7_read_write_transport_size_UDINT;
break;
+ default:
+ // For all other transport sizes, no adjustment is required
+ break;
}
}
diff --git a/plc4c/generated-sources/modbus/src/data_item.c
b/plc4c/generated-sources/modbus/src/data_item.c
index 0b1a1ab3e5..42c922437f 100644
--- a/plc4c/generated-sources/modbus/src/data_item.c
+++ b/plc4c/generated-sources/modbus/src/data_item.c
@@ -828,7 +828,7 @@ plc4c_return_code
plc4c_modbus_read_write_data_item_serialize(plc4x_spi_context
} else if((dataType ==
plc4c_modbus_read_write_modbus_data_type_CHAR) && (numberOfValues == 1)) { /*
CHAR */
// Simple field (value)
- _res = plc4c_spi_write_string(writeBuffer, 8, "UTF-8",
(char*) (*data_item)->data.char_value);
+ _res = plc4c_spi_write_string(writeBuffer, 8, "UTF-8",
(const uint8_t*) (*data_item)->data.char_value);
if(_res != OK) {
return _res;
}
@@ -838,7 +838,7 @@ plc4c_return_code
plc4c_modbus_read_write_data_item_serialize(plc4x_spi_context
} else if((dataType ==
plc4c_modbus_read_write_modbus_data_type_WCHAR) && (numberOfValues == 1)) { /*
WCHAR */
// Simple field (value)
- _res = plc4c_spi_write_string(writeBuffer, 16, "UTF-16",
(char*) (*data_item)->data.wchar_value);
+ _res = plc4c_spi_write_string(writeBuffer, 16, "UTF-16",
(const uint8_t*) (*data_item)->data.wchar_value);
if(_res != OK) {
return _res;
}
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_message.c
b/plc4c/generated-sources/plc4x/src/plc4x_message.c
index 2d873475c1..0bea5bac8d 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_message.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_message.c
@@ -365,7 +365,7 @@ plc4c_return_code
plc4c_plc4x_read_write_plc4x_message_serialize(plc4x_spi_conte
}
// Simple Field (connectionString)
- _res = plc4c_spi_write_string(writeBuffer,
(plc4c_spi_evaluation_helper_str_len(_message->plc4x_connect_request_connection_string))
* (8), "UTF-8", _message->plc4x_connect_request_connection_string);
+ _res = plc4c_spi_write_string(writeBuffer,
(plc4c_spi_evaluation_helper_str_len(_message->plc4x_connect_request_connection_string))
* (8), "UTF-8", (const uint8_t*)
_message->plc4x_connect_request_connection_string);
if(_res != OK) {
return _res;
}
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_tag.c
b/plc4c/generated-sources/plc4x/src/plc4x_tag.c
index d7a280ae19..b11e53e4dc 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_tag.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_tag.c
@@ -81,7 +81,7 @@ plc4c_return_code
plc4c_plc4x_read_write_plc4x_tag_serialize(plc4x_spi_context c
}
// Simple Field (name)
- _res = plc4c_spi_write_string(writeBuffer,
(plc4c_spi_evaluation_helper_str_len(_message->name)) * (8), "UTF-8",
_message->name);
+ _res = plc4c_spi_write_string(writeBuffer,
(plc4c_spi_evaluation_helper_str_len(_message->name)) * (8), "UTF-8", (const
uint8_t*) _message->name);
if(_res != OK) {
return _res;
}
@@ -93,7 +93,7 @@ plc4c_return_code
plc4c_plc4x_read_write_plc4x_tag_serialize(plc4x_spi_context c
}
// Simple Field (tagQuery)
- _res = plc4c_spi_write_string(writeBuffer,
(plc4c_spi_evaluation_helper_str_len(_message->tag_query)) * (8), "UTF-8",
_message->tag_query);
+ _res = plc4c_spi_write_string(writeBuffer,
(plc4c_spi_evaluation_helper_str_len(_message->tag_query)) * (8), "UTF-8",
(const uint8_t*) _message->tag_query);
if(_res != OK) {
return _res;
}
diff --git a/plc4c/generated-sources/plc4x/src/plc4x_value.c
b/plc4c/generated-sources/plc4x/src/plc4x_value.c
index fcb51fd174..1f0bc04a7b 100644
--- a/plc4c/generated-sources/plc4x/src/plc4x_value.c
+++ b/plc4c/generated-sources/plc4x/src/plc4x_value.c
@@ -440,14 +440,14 @@ plc4c_return_code
plc4c_plc4x_read_write_plc4x_value_serialize(plc4x_spi_context
} else if(valueType ==
plc4c_plc4x_read_write_plc4x_value_type_CHAR) { /* STRING */
// Simple field (value)
- _res = plc4c_spi_write_string(writeBuffer, 8, "UTF-8",
(char*) (*data_item)->data.string_value);
+ _res = plc4c_spi_write_string(writeBuffer, 8, "UTF-8",
(const uint8_t*) (*data_item)->data.string_value);
if(_res != OK) {
return _res;
}
} else if(valueType ==
plc4c_plc4x_read_write_plc4x_value_type_WCHAR) { /* STRING */
// Simple field (value)
- _res = plc4c_spi_write_string(writeBuffer, 16, "UTF-16",
(char*) (*data_item)->data.string_value);
+ _res = plc4c_spi_write_string(writeBuffer, 16, "UTF-16",
(const uint8_t*) (*data_item)->data.string_value);
if(_res != OK) {
return _res;
}
diff --git a/plc4c/generated-sources/s7/src/data_item.c
b/plc4c/generated-sources/s7/src/data_item.c
index 161e341de0..3401d9e5f5 100644
--- a/plc4c/generated-sources/s7/src/data_item.c
+++ b/plc4c/generated-sources/s7/src/data_item.c
@@ -593,14 +593,14 @@ plc4c_return_code
plc4c_s7_read_write_data_item_serialize(plc4x_spi_context ctx,
} else if(strcmp(dataProtocolId, "IEC61131_CHAR") == 0) { /*
CHAR */
// Simple field (value)
- _res = plc4c_spi_write_string(writeBuffer, 8, "UTF-8",
(char*) (*data_item)->data.char_value);
+ _res = plc4c_spi_write_string(writeBuffer, 8, "UTF-8",
(const uint8_t*) (*data_item)->data.char_value);
if(_res != OK) {
return _res;
}
} else if(strcmp(dataProtocolId, "IEC61131_WCHAR") == 0) { /*
CHAR */
// Simple field (value)
- _res = plc4c_spi_write_string(writeBuffer, 16, "UTF-16",
(char*) (*data_item)->data.char_value);
+ _res = plc4c_spi_write_string(writeBuffer, 16, "UTF-16",
(const uint8_t*) (*data_item)->data.char_value);
if(_res != OK) {
return _res;
}
diff --git a/plc4c/generated-sources/s7/src/memory_area.c
b/plc4c/generated-sources/s7/src/memory_area.c
index 3e37ab7510..78fbd9602e 100644
--- a/plc4c/generated-sources/s7/src/memory_area.c
+++ b/plc4c/generated-sources/s7/src/memory_area.c
@@ -193,6 +193,7 @@ plc4c_s7_read_write_memory_area
plc4c_s7_read_write_memory_area_get_first_enum_f
if (strcmp(value, "T") == 0) {
return plc4c_s7_read_write_memory_area_TIMERS;
}
+ return (plc4c_s7_read_write_memory_area) 0;
}
uint16_t plc4c_s7_read_write_memory_area_length_in_bytes(plc4x_spi_context
ctx, plc4c_s7_read_write_memory_area* _message) {
diff --git a/plc4c/generated-sources/s7/src/s7_payload_user_data_item.c
b/plc4c/generated-sources/s7/src/s7_payload_user_data_item.c
index 500330fc15..c85861cef4 100644
--- a/plc4c/generated-sources/s7/src/s7_payload_user_data_item.c
+++ b/plc4c/generated-sources/s7/src/s7_payload_user_data_item.c
@@ -601,7 +601,7 @@ if( ( cpuFunctionGroup == 0x04 ) && ( cpuFunctionType ==
0x04 ) && ( cpuSubfunct
// Optional Field (alarmtype) (Can be skipped, if a given expression
evaluates to false)
plc4c_s7_read_write_alarm_state_type* alarmtype = NULL;
if((subscription) >= (128)) {
- _res = plc4c_s7_read_write_alarm_state_type_parse(ctx, readBuffer,
&alarmtype);
+ _res = plc4c_s7_read_write_alarm_state_type_parse(ctx, readBuffer,
alarmtype);
if(_res != OK) {
return _res;
}
@@ -1351,14 +1351,14 @@ plc4c_return_code
plc4c_s7_read_write_s7_payload_user_data_item_serialize(plc4x_
}
// Simple Field (magicKey)
- _res = plc4c_spi_write_string(writeBuffer, 64, "UTF-8", (char*)
_message->s7_payload_user_data_item_cpu_function_msg_subscription_request_magic_key);
+ _res = plc4c_spi_write_string(writeBuffer, 64, "UTF-8", (const uint8_t*)
_message->s7_payload_user_data_item_cpu_function_msg_subscription_request_magic_key);
if(_res != OK) {
return _res;
}
// Optional Field (alarmtype)
if(_message->s7_payload_user_data_item_cpu_function_msg_subscription_request_alarmtype
!= NULL) {
- _res = plc4c_s7_read_write_alarm_state_type_serialize(ctx, writeBuffer,
&_message->s7_payload_user_data_item_cpu_function_msg_subscription_request_alarmtype);
+ _res = plc4c_s7_read_write_alarm_state_type_serialize(ctx, writeBuffer,
_message->s7_payload_user_data_item_cpu_function_msg_subscription_request_alarmtype);
if(_res != OK) {
return _res;
}
diff --git a/plc4c/generated-sources/s7/src/transport_size.c
b/plc4c/generated-sources/s7/src/transport_size.c
index 9f9fc2a577..6c839b9d4f 100644
--- a/plc4c/generated-sources/s7/src/transport_size.c
+++ b/plc4c/generated-sources/s7/src/transport_size.c
@@ -1550,6 +1550,7 @@ plc4c_s7_read_write_transport_size
plc4c_s7_read_write_transport_size_get_first_
if (strcmp(value, "S7_S5TIME") == 0) {
return plc4c_s7_read_write_transport_size_S5TIME;
}
+ return (plc4c_s7_read_write_transport_size) 0;
}
plc4c_s7_read_write_transport_size
plc4c_s7_read_write_transport_size_get_base_type(plc4c_s7_read_write_transport_size
value) {
diff --git a/plc4c/spi/include/plc4c/spi/write_buffer.h
b/plc4c/spi/include/plc4c/spi/write_buffer.h
index 8f8c0706ac..dce9c4f728 100644
--- a/plc4c/spi/include/plc4c/spi/write_buffer.h
+++ b/plc4c/spi/include/plc4c/spi/write_buffer.h
@@ -84,6 +84,6 @@ plc4c_return_code
plc4c_spi_write_double(plc4c_spi_write_buffer* buf, uint8_t nu
// TODO: Not sure which type to use in this case ...
//plc4c_return_code plc4c_spi_write_big_decimal(plc4c_spi_write_buffer* buf,
uint8_t num_bits, doubledouble value);
-plc4c_return_code plc4c_spi_write_string(plc4c_spi_write_buffer* buf, uint8_t
num_bits, char* encoding, char* value);
+plc4c_return_code plc4c_spi_write_string(plc4c_spi_write_buffer* buf, uint8_t
num_bits, const char* encoding, const uint8_t* bytes);
#endif // PLC4C_WRITE_BUFFER_H_
\ No newline at end of file
diff --git a/plc4c/spi/src/data.c b/plc4c/spi/src/data.c
index 893a4c9b70..4f2a2bbc52 100644
--- a/plc4c/spi/src/data.c
+++ b/plc4c/spi/src/data.c
@@ -526,7 +526,7 @@ void plc4c_data_printf(plc4c_data *data) {
printf("%s", data->data.string_value);
break;
case PLC4C_WSTRING:
- printf("%ws", data->data.wstring_value);
+ printf("%ls", data->data.wstring_value);
break;
case PLC4C_LIST:
diff --git a/plc4c/spi/src/write_buffer.c b/plc4c/spi/src/write_buffer.c
index 9699d8d531..7f443c45c9 100644
--- a/plc4c/spi/src/write_buffer.c
+++ b/plc4c/spi/src/write_buffer.c
@@ -62,7 +62,7 @@ void
plc4c_spi_write_put_byte_internal(plc4c_spi_write_buffer* buf,
}
plc4c_return_code plc4c_spi_write_unsigned_bits_internal(
- plc4c_spi_write_buffer* buf, uint8_t num_bits, uint8_t* value) {
+ plc4c_spi_write_buffer* buf, uint8_t num_bits, const uint8_t* value) {
if (buf == NULL) {
return NULL_VALUE;
}
@@ -421,16 +421,16 @@ plc4c_return_code
plc4c_spi_write_double(plc4c_spi_write_buffer* buf,
* } */
plc4c_return_code plc4c_spi_write_string(plc4c_spi_write_buffer* buf,
- uint8_t num_bits, char* encoding,
- char* value) {
+ uint8_t num_bits, const char*
encoding,
+ const uint8_t* bytes) {
// Right now we only support utf-8 and utf-16.
if((strcmp(encoding,"UTF-8") != 0) && (strcmp(encoding,"UTF-16") != 0)) {
return INVALID_ARGUMENT;
}
// Simply output the bytes to the buffer.
for(int i = 0; (i < (num_bits / 8)); i++) {
- plc4c_spi_write_unsigned_byte(buf, 8, *((uint8_t*) value));
- value++;
+ plc4c_spi_write_unsigned_byte(buf, 8, *((uint8_t*) bytes));
+ bytes++;
}
return OK;
}
diff --git a/plc4c/spi/test/write_buffer_test.c
b/plc4c/spi/test/write_buffer_test.c
index 777107fe70..5095d94ca6 100644
--- a/plc4c/spi/test/write_buffer_test.c
+++ b/plc4c/spi/test/write_buffer_test.c
@@ -857,12 +857,12 @@ void test_plc4c_spi_write_double(void) {
}
void test_plc4c_spi_write_string_args(char* message,
- plc4c_spi_write_buffer* write_buffer,
uint8_t num_bits, char* encoding,
- plc4c_return_code expected_return_code,
char* value) {
+ plc4c_spi_write_buffer* write_buffer,
uint8_t num_bits, const char* encoding,
+ plc4c_return_code expected_return_code,
const uint8_t* bytes) {
printf("Running write_buffer write_string test: %s", message);
plc4c_return_code result =
- plc4c_spi_write_string(write_buffer, num_bits, encoding, value);
+ plc4c_spi_write_string(write_buffer, num_bits, encoding, bytes);
TEST_ASSERT_EQUAL_INT(expected_return_code, result);
@@ -873,7 +873,7 @@ void test_plc4c_spi_write_string(void) {
// Prepare input data
plc4c_spi_write_buffer* write_buffer;
plc4c_spi_write_buffer_create(32, &write_buffer);
- test_plc4c_spi_write_string_args("Simple 32 bit string (4 chars)",
write_buffer, 32, "UTF-8", OK, "Hurz");
+ test_plc4c_spi_write_string_args("Simple 32 bit string (4 chars)",
write_buffer, 32, "UTF-8", OK, (const uint8_t*) "Hurz");
uint8_t expected_data[] = {0x48, 0x75, 0x72, 0x7a};
internal_write_buffer_assert_arrays_equal((uint8_t*) &expected_data,
write_buffer, 4);
plc4c_spi_write_buffer_destroy(write_buffer);
diff --git a/plc4c/tools/plc4x-server/src/plc4x_server.c
b/plc4c/tools/plc4x-server/src/plc4x_server.c
index e39cc7edd6..6498f841f1 100644
--- a/plc4c/tools/plc4x-server/src/plc4x_server.c
+++ b/plc4c/tools/plc4x-server/src/plc4x_server.c
@@ -70,7 +70,11 @@ void connection_func(unsigned int connFd) {
}
int main(int argc, char** argv) {
+#ifndef _WIN32
+ socklen_t len;
+#else
int len;
+#endif
unsigned int sockFd, connFd;
struct sockaddr_in serverAddress, cli;
diff --git
a/protocols/knxnetip/src/main/generated/protocols/knxnetip/knx-master-data.mspec
b/protocols/knxnetip/src/main/generated/protocols/knxnetip/knx-master-data.mspec
index ceb84bc8c8..2a9c0bb610 100644
---
a/protocols/knxnetip/src/main/generated/protocols/knxnetip/knx-master-data.mspec
+++
b/protocols/knxnetip/src/main/generated/protocols/knxnetip/knx-master-data.mspec
@@ -1510,8 +1510,9 @@
['758' M_ENERVON_TECHNOLOGY ['819', '"Enervon Technology"']]
['759' M_STRUCTURED_CABLE_PRODUCTS ['820', '"structured cable products"']]
['760' M_JIWU_FUZHOU_TECHNOLOGY_CO___LTD_ ['821', '"Jiwu (Fuzhou)
Technology Co., Ltd."']]
- ['761' M_ABB___RESERVED ['43954', '"ABB - reserved"']]
- ['762' M_BUSCH_JAEGER_ELEKTRO___RESERVED ['43959', '"Busch-Jaeger Elektro
- reserved"']]
+ ['761' M_FOSHAN_BRISDOM_TECHNOLOGY_CO___LTD_ ['822', '"Foshan Brisdom
Technology Co., Ltd."']]
+ ['762' M_ABB___RESERVED ['43954', '"ABB - reserved"']]
+ ['763' M_BUSCH_JAEGER_ELEKTRO___RESERVED ['43959', '"Busch-Jaeger Elektro
- reserved"']]
]