Skip to content

Commit 4d6abd6

Browse files
bwikbsswift-kim
authored andcommitted
Fix issues from static analysis (flutter-tizen#202)
* Casting a signed value which has type 'int' to a bigger unsigned integer type 'size_t' while initializing a variable * Assignment of a signed value which has type 'int32_t' to a variable of a bigger integer type 'size_t' * Uninitialized field Signed-off-by: MuHong Byun <[email protected]>
1 parent 70804d2 commit 4d6abd6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

shell/platform/tizen/channels/text_input_channel.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ void TextInputChannel::HandleMethodCall(
267267
if (composing_base_value == -1 && composing_extent_value == -1) {
268268
active_model_->EndComposing();
269269
} else {
270-
size_t composing_start =
271-
std::min(composing_base_value, composing_extent_value);
270+
size_t composing_start = static_cast<size_t>(
271+
std::min(composing_base_value, composing_extent_value));
272272
size_t cursor_offset = selection_base_value - composing_start;
273273

274274
active_model_->SetComposingRange(

shell/platform/tizen/flutter_tizen_engine.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ void FlutterTizenEngine::SendWindowMetrics(int32_t width,
348348
double pixel_ratio) {
349349
FlutterWindowMetricsEvent event = {};
350350
event.struct_size = sizeof(FlutterWindowMetricsEvent);
351-
event.width = width;
352-
event.height = height;
351+
event.width = static_cast<size_t>(width);
352+
event.height = static_cast<size_t>(height);
353353
if (pixel_ratio == 0.0) {
354354
// The scale factor is computed based on the display DPI and the current
355355
// profile. A fixed DPI value (72) is used on TVs. See:

shell/platform/tizen/public/flutter_platform_view.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ class PlatformView {
5959
class PlatformViewFactory {
6060
public:
6161
PlatformViewFactory(flutter::PluginRegistrar* registrar)
62-
: registrar_(registrar),
62+
: platform_window_(nullptr),
63+
registrar_(registrar),
6364
codec_(flutter::StandardMessageCodec::GetInstance(nullptr)) {}
6465
virtual ~PlatformViewFactory() {}
6566
flutter::PluginRegistrar* GetPluginRegistrar() { return registrar_; }

shell/platform/tizen/tizen_input_method_context.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const char* GetEcoreImfContextAvailableId() {
2222

2323
Ecore_IMF_Input_Panel_Layout TextInputTypeToEcoreIMFInputPanelLayout(
2424
const std::string& text_input_type) {
25-
FT_ASSERT(panel_layout);
2625
if (text_input_type == "TextInputType.text" ||
2726
text_input_type == "TextInputType.multiline") {
2827
return ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;

0 commit comments

Comments
 (0)