Fix defect detected by static analysis tool 48/248648/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 1 Dec 2020 07:03:41 +0000 (16:03 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 1 Dec 2020 07:04:52 +0000 (16:04 +0900)
Expression 'this->code <= 4294967295U' is always true , which may be caused by a logical error: 'this->code' has a type 'const scim::uint32' with minimum value '0' and a maximum value '4294967295'

Change-Id: Iefd9863c95f684d78950fe17d75493af23fc031b
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
ism/src/scim_event.cpp

index a5eea71..2cc4d2f 100644 (file)
@@ -185,7 +185,7 @@ KeyEvent::get_key_string () const
 
     if (code == 0xFFFFFF) {
         codestr = String ("VoidSymbol");
-    } else if (code <= 0xFFFFFFFF){
+    } else {
         __KeyName *it = std::lower_bound (__scim_keys_by_code,
                                           __scim_keys_by_code + SCIM_NUM_KEY_NAMES,
                                           code,