From 6a00bd131bbacedcd226e9158a4be7393e8e600b Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Thu, 8 Jan 2026 10:32:29 +0100 Subject: [PATCH] [clang,warnings] fix Wjump-misses-init --- channels/location/client/location_main.c | 25 ++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/channels/location/client/location_main.c b/channels/location/client/location_main.c index 97384fc60..d6c96de14 100644 --- a/channels/location/client/location_main.c +++ b/channels/location/client/location_main.c @@ -186,12 +186,14 @@ static UINT location_on_data_received(IWTSVirtualChannelCallback* pChannelCallba break; } - char cbuffer[64] = { 0 }; - char sbuffer[64] = { 0 }; - WLog_Print(plugin->baseDynPlugin.log, WLOG_DEBUG, - "Server version %s, client version %s", - location_version_str(callback->serverVersion, sbuffer, sizeof(sbuffer)), - location_version_str(callback->clientVersion, cbuffer, sizeof(cbuffer))); + { + char cbuffer[64] = { 0 }; + char sbuffer[64] = { 0 }; + WLog_Print(plugin->baseDynPlugin.log, WLOG_DEBUG, + "Server version %s, client version %s", + location_version_str(callback->serverVersion, sbuffer, sizeof(sbuffer)), + location_version_str(callback->clientVersion, cbuffer, sizeof(cbuffer))); + } if (!plugin->context.LocationStart) { @@ -199,10 +201,13 @@ static UINT location_on_data_received(IWTSVirtualChannelCallback* pChannelCallba "LocationStart=NULL, no location data will be sent"); return CHANNEL_RC_OK; } - const UINT res = - plugin->context.LocationStart(&plugin->context, callback->clientVersion, 0); - if (res != CHANNEL_RC_OK) - return res; + + { + const UINT res = + plugin->context.LocationStart(&plugin->context, callback->clientVersion, 0); + if (res != CHANNEL_RC_OK) + return res; + } return location_send_client_ready_pdu(callback); default: WLog_WARN(TAG, "invalid pduType=%s");