From: yanjie.hu Date: Thu, 9 Jan 2014 05:44:13 +0000 (+0800) Subject: fix warnings X-Git-Tag: submit/tizen/20150203.004337~47 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F22485%2F1;p=platform%2Fcore%2Fuifw%2Flibscl-ui.git fix warnings Change-Id: I554434b5fa7d9e8df47c37413f57f50488c85c8a --- diff --git a/binary_xmlresource/file_storage.cpp b/binary_xmlresource/file_storage.cpp index d5302ab..cf4f944 100644 --- a/binary_xmlresource/file_storage.cpp +++ b/binary_xmlresource/file_storage.cpp @@ -18,10 +18,10 @@ #include "file_storage_impl.h" FileStorage::FileStorage(const IString_Provider* string_provider): - m_string_provider(string_provider), m_storage(NULL), + m_offset(0), m_size(0), - m_offset(0) { + m_string_provider(string_provider) { } FileStorage::~FileStorage() { diff --git a/binary_xmlresource/include/metadata_provider.h b/binary_xmlresource/include/metadata_provider.h index 1567d30..f937a95 100644 --- a/binary_xmlresource/include/metadata_provider.h +++ b/binary_xmlresource/include/metadata_provider.h @@ -42,18 +42,18 @@ class Metadata_Provider:public IMetadata_Provider{ assert(record_name != NULL); if ( current_record_name == NULL ||0 != strcmp(current_record_name, record_name)) { current_record_name = record_name; - curRecordIndex = find_metadata_record_index(record_name); + curRecordIndex = (int)find_metadata_record_index(record_name); if (curRecordIndex == -1) { printf("Can not find %s metadata record.\n", record_name); } } } private: - const int find_metadata_record_index(const char* name)const{ + size_t find_metadata_record_index(const char* name)const{ if (name == NULL) return -1; const MetaData* metadata = m_metadataParser->get_metadata(); - for ( int i = 0; i < metadata->m_vec_metadata_record.size(); ++i) { + for ( size_t i = 0; i < metadata->m_vec_metadata_record.size(); ++i) { const MetaData_Record& metadata_record = metadata->m_vec_metadata_record.at(i); if (0 == strcmp(metadata_record.m_name, name)) { diff --git a/binary_xmlresource/include/string_provider.h b/binary_xmlresource/include/string_provider.h index 52f99d4..d5ca0b1 100644 --- a/binary_xmlresource/include/string_provider.h +++ b/binary_xmlresource/include/string_provider.h @@ -24,11 +24,11 @@ class String_Provider: public IString_Provider{ public: String_Provider(const String_Bin_Parser* sp): m_sp(sp) {} - const char* get_string_by_id(const int id)const{ + const char* get_string_by_id(int id)const{ if (m_sp == NULL) return NULL; const std::vector& string_depository = m_sp->get_string_depository(); - if (id >= 0 && id < string_depository.size()) + if (id >= 0 && id < (int)string_depository.size()) return string_depository.at(id); return NULL; diff --git a/binary_xmlresource/key_coordinate_frame_bin_parser.cpp b/binary_xmlresource/key_coordinate_frame_bin_parser.cpp index 369b413..0770bcb 100644 --- a/binary_xmlresource/key_coordinate_frame_bin_parser.cpp +++ b/binary_xmlresource/key_coordinate_frame_bin_parser.cpp @@ -54,7 +54,6 @@ BinKeyCoordFrameParser:: load(int layout_id) { BinResource *bin_xmlres = BinResource::get_instance(); - int layout_data_offset = bin_xmlres->info[LAYOUT].offset; char path[_POSIX_PATH_MAX] = {0}; @@ -160,8 +159,6 @@ BinKeyCoordFrameParser::get_key_coordinate_pointer_frame() { void BinKeyCoordFrameParser::decode_key_coordinate_record(FileStorage& storage, const PSclLayoutKeyCoordinate cur, const Key_coordinate_record_width& record_width) { - int width = 0; - cur->valid = (sclboolean)true; //x cur->x = storage.get(record_width.x); diff --git a/binary_xmlresource/layout_bin_parser.cpp b/binary_xmlresource/layout_bin_parser.cpp index 4d56e28..3547228 100644 --- a/binary_xmlresource/layout_bin_parser.cpp +++ b/binary_xmlresource/layout_bin_parser.cpp @@ -99,7 +99,7 @@ parsing_layout_table() { m_layout_size = m_storage.get(REC_NUM_BYTES); // layout_rec_data_size - int layout_rec_data_size = m_storage.get(LAYOUT_REC_DATA_SIZE_BYTES); + m_storage.advance(LAYOUT_REC_DATA_SIZE_BYTES); for (int i = 0; i < m_layout_size; ++i) { SclLayout& cur = m_layout_table[i]; diff --git a/scl/gwes/efl/sclevents-efl.cpp b/scl/gwes/efl/sclevents-efl.cpp index e3efa64..8f6c25b 100644 --- a/scl/gwes/efl/sclevents-efl.cpp +++ b/scl/gwes/efl/sclevents-efl.cpp @@ -223,7 +223,6 @@ Eina_Bool mouse_press(void *data, int type, void *event_info) } } - sclwindow evwin = (sclwindow)(ev->window); sclboolean is_scl_window = FALSE; if (elm_win_xwindow_get(static_cast(windows->get_base_window())) == ev->window) { is_scl_window = TRUE; diff --git a/scl/gwes/efl/sclwindows-efl.cpp b/scl/gwes/efl/sclwindows-efl.cpp index 1460841..c2fde7b 100644 --- a/scl/gwes/efl/sclwindows-efl.cpp +++ b/scl/gwes/efl/sclwindows-efl.cpp @@ -669,6 +669,8 @@ CSCLWindowsImplEfl::move_window(const sclwindow window, scl16 x, scl16 y) rotatey = orgx; } break; + case ROTATION_0: break; + default: break; } #ifdef DO_NOT_MOVE_MAGNIFIER_WINDOW diff --git a/scl/include/scluibuilder.h b/scl/include/scluibuilder.h index 5c74587..9e30033 100644 --- a/scl/include/scluibuilder.h +++ b/scl/include/scluibuilder.h @@ -56,12 +56,12 @@ private: sclboolean draw_button_bg_by_sw(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state); sclboolean draw_window_bg_by_sw(const sclwindow window, const scldrawctx draw_ctx, const SclSize size, const scldouble line_width, const SclColor line_color, const SclColor fill_color); - sclboolean draw_button_bg_by_img(const sclwindow window, const scldrawctx draw_ctx,const scl16 key_index, - const SCLButtonState state, const sclboolean shift); + sclboolean draw_button_bg_by_img(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, + SCLButtonState state, SCLShiftState shift); sclboolean draw_button_bg_by_layoutimg(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state, const sclboolean shift); sclboolean draw_button_label(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, - const SCLButtonState state, const sclboolean shift); + SCLButtonState state, SCLShiftState shift); sclboolean draw_magnifier_label(const sclwindow window, const scldrawctx draw_ctx, const scl16 label_index, const sclchar* label); diff --git a/scl/sclcontext.cpp b/scl/sclcontext.cpp index b289183..8b8a0ef 100644 --- a/scl/sclcontext.cpp +++ b/scl/sclcontext.cpp @@ -300,8 +300,6 @@ CSCLContext::set_farthest_move_point(scltouchdevice touch_id, sclint x, sclint y MultiTouchContext *ctx = find_multi_touch_context(touch_id); if (ctx) { CSCLUtils *utils = CSCLUtils::get_instance(); - sclint deltax = ctx->cur_pressed_point.x - x; - sclint deltay = ctx->cur_pressed_point.y - y; ctx->farthest_move_dist = utils->get_approximate_distance(x, y, ctx->cur_pressed_point.x, ctx->cur_pressed_point.y); ctx->farthest_move_point.x = x; diff --git a/scl/sclcontroller.cpp b/scl/sclcontroller.cpp index 87a0316..4e09245 100644 --- a/scl/sclcontroller.cpp +++ b/scl/sclcontroller.cpp @@ -527,8 +527,10 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint handler->on_event_key_clicked(key_event_desc); } break; + case BUTTON_TYPE_UIITEM: break; + case MAX_BUTTON_TYPE: break; + default: break; } - switch (coordinate->popup_type) { case POPUP_TYPE_BTN_PRESS_POPUP_DRAG: { sclint popup_input_mode = sclres_manager->get_inputmode_id(coordinate->popup_input_mode[SCL_DRAG_STATE_NONE]); @@ -585,6 +587,8 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint case POPUP_TYPE_BTN_LONGPRESS_POPUP_ONCE: case POPUP_TYPE_AUTO_POPUP: case POPUP_TYPE_NONE: + case MAX_POPUP_TYPE: + default: /* Nothing to do in here */ break; } @@ -1008,6 +1012,9 @@ CSCLController::process_button_repeat_pressed_event(sclwindow window, sclbyte ke } } break; + case BUTTON_TYPE_UIITEM: break; + case MAX_BUTTON_TYPE: break; + default: break; } } } @@ -1266,6 +1273,17 @@ CSCLController::process_button_move_event(sclwindow window, sclint x, sclint y, } } break; + case BUTTON_TYPE_NORMAL: break; + case BUTTON_TYPE_GRAB: break; + case BUTTON_TYPE_SELFISH: break; + case BUTTON_TYPE_MULTITAP: break; + case BUTTON_TYPE_ROTATION: break; + case BUTTON_TYPE_DIRECTION: break; + case BUTTON_TYPE_RELATIVE_DIRECTION: break; + case BUTTON_TYPE_UIITEM: break; + case MAX_BUTTON_TYPE: break; + default: + break; } #ifdef DIRECTLY_DRAW_ON_EVENTS @@ -1377,7 +1395,6 @@ CSCLController::process_button_over_event(sclwindow window, sclint x, sclint y, if (keyindex != highlighted_key || window != highlighted_window ) { printf("%d != %d || %p != %p\n", keyindex, highlighted_key, window, highlighted_window); if(layout) { - SclPoint pos = {0,}; sclfloat scale_rate_x, scale_rate_y; if(layout->display_mode == DISPLAYMODE_PORTRAIT) { scale_rate_x = utils->get_scale_rate_x(); @@ -1446,7 +1463,7 @@ CSCLController::get_drag_key_modifier(sclint deltax, sclint deltay, sclfloat dis { 5 * (M_PI / 8), 7 * (M_PI / 8), KEY_MODIFIER_DIRECTION_DOWN_LEFT}, { 7 * (M_PI / 8), 8 * (M_PI / 8), KEY_MODIFIER_DIRECTION_LEFT}, }; - for (sclint loop = 0;loop < sizeof(info) / sizeof(DIRECTIONINFO);loop++) { + for (size_t loop = 0; loop < sizeof(info) / sizeof(DIRECTIONINFO); loop++) { if (theta >= info[loop].lowerbound && theta <= info[loop].upperbound) { key_modifier = info[loop].modifier; } @@ -1483,7 +1500,7 @@ CSCLController::get_drag_key_modifier(sclint deltax, sclint deltay, sclfloat dis { 1 * (M_PI / 4), 3 * (M_PI / 4), KEY_MODIFIER_DIRECTION_DOWN}, { 3 * (M_PI / 4), 4 * (M_PI / 4), KEY_MODIFIER_DIRECTION_LEFT}, }; - for (sclint loop = 0;loop < sizeof(info) / sizeof(DIRECTIONINFO);loop++) { + for (size_t loop = 0; loop < sizeof(info) / sizeof(DIRECTIONINFO); loop++) { if (theta >= info[loop].lowerbound && theta <= info[loop].upperbound) { key_modifier = info[loop].modifier; } @@ -1772,8 +1789,11 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint case BUTTON_TYPE_DRAG : { } break; - } + case BUTTON_TYPE_UIITEM: break; + case MAX_BUTTON_TYPE: break; + default: break; + } switch (coordinate->popup_type) { case POPUP_TYPE_BTN_RELEASE_POPUP: case POPUP_TYPE_BTN_RELEASE_POPUP_ONCE: { @@ -1854,6 +1874,10 @@ CSCLController::process_button_release_event(sclwindow window, sclint x, sclint case POPUP_TYPE_NONE: /* Nothing to do in here */ break; + case POPUP_TYPE_BTN_LONGPRESS_POPUP_ONCE: break; + case POPUP_TYPE_BTN_LONGPRESS_POPUP: break; + case MAX_POPUP_TYPE: break; + default: break; } } @@ -2454,15 +2478,22 @@ CSCLController::mouse_release(sclwindow window, sclint x, sclint y, scltouchdevi sclboolean signaled = FALSE; if (coordinate) { switch (coordinate->popup_type) { - case POPUP_TYPE_BTN_RELEASE_POPUP: - case POPUP_TYPE_BTN_RELEASE_POPUP_ONCE: - case POPUP_TYPE_BTN_LONGPRESS_POPUP: - case POPUP_TYPE_BTN_LONGPRESS_POPUP_ONCE: - /* Fix me : We should consider z-order */ - skipwindow = windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP); - handle_engine_signal(SCL_SIG_MOUSE_RELEASE, skipwindow); - signaled = TRUE; - break; + case POPUP_TYPE_BTN_RELEASE_POPUP: + case POPUP_TYPE_BTN_RELEASE_POPUP_ONCE: + case POPUP_TYPE_BTN_LONGPRESS_POPUP: + case POPUP_TYPE_BTN_LONGPRESS_POPUP_ONCE: + { + /* Fix me : We should consider z-order */ + skipwindow = windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP); + handle_engine_signal(SCL_SIG_MOUSE_RELEASE, skipwindow); + signaled = TRUE; + } + break; + case POPUP_TYPE_NONE: break; + case POPUP_TYPE_BTN_PRESS_POPUP_DRAG: break; + case POPUP_TYPE_AUTO_POPUP: break; + case MAX_POPUP_TYPE: break; + default: break; } } if (!signaled) { @@ -3120,10 +3151,6 @@ CSCLController::mouse_over(sclwindow window, sclint x, sclint y) sclboolean CSCLController::timer_event(const scl32 data) { - struct my_srtuct { - struct typeA {short x; short y;}; - struct typeB {short x; short y;}; - } strt; SCL_DEBUG(); CSCLWindows *windows = CSCLWindows::get_instance(); CSCLContext *context = CSCLContext::get_instance(); @@ -3328,7 +3355,6 @@ CSCLController::timer_event(const scl32 data) break; case SCL_TIMER_AUTOTEST: { CSCLResourceCache *cache = CSCLResourceCache::get_instance(); - SCLDisplayMode display_mode = context->get_display_mode(); sclint rnd = rand() % 100; sclint x = (rand() % (cache->get_cur_layout(windows->get_base_window())->width)); @@ -3427,6 +3453,17 @@ void CSCLController::handle_engine_signal( SclInternalSignal signal, sclwindow t windows->close_all_popups(); } break; + case SCL_SIG_START: + case SCL_SIG_INPMODE_CHANGE: + case SCL_SIG_DISP_CHANGE: + case SCL_SIG_POPUP_SHOW: + case SCL_SIG_POPUP_HIDE: + case SCL_SIG_MOUSE_PRESS: + case SCL_SIG_MOUSE_LONG_PRESS: + case SCL_SIG_MOUSE_RELEASE: + case SCL_SIG_KEYEVENT: + default: + break; } int loop = 0; diff --git a/scl/scleventhandler.cpp b/scl/scleventhandler.cpp index ef17a15..9ef2da7 100644 --- a/scl/scleventhandler.cpp +++ b/scl/scleventhandler.cpp @@ -77,6 +77,9 @@ static void handle_shift_button_click_event(SclUIEventDesc ui_event_desc) uiimpl->set_shift_state(SCL_SHIFT_STATE_OFF); } break; + case SCL_SHIFT_STATE_MAX: + default: + break; } } } diff --git a/scl/sclresourcecache.cpp b/scl/sclresourcecache.cpp index d980cd0..5a1220a 100644 --- a/scl/sclresourcecache.cpp +++ b/scl/sclresourcecache.cpp @@ -875,7 +875,6 @@ CSCLResourceCache::recompute_layout(sclwindow window) sclshort layout = NOT_USED; if (windows && context && utils) { - sclbyte display = context->get_display_mode(); sclbyte inputmode = context->get_input_mode(); if (windows->is_base_window(window)) { @@ -1397,7 +1396,6 @@ CSCLResourceCache::clone_keyproperties(SclPrivateKeyProperties* priv, sclbyte in clear_privatekeyproperties(priv); /* gets the value of the previous key properties */ - sclint loop; SclLayoutKeyCoordinate keyCoordinate = { 0 }; if (scl_check_arrindex_unsigned(layout_index, MAX_SCL_LAYOUT) && scl_check_arrindex_unsigned(key_index, MAX_KEY)) { diff --git a/scl/scluibuilder.cpp b/scl/scluibuilder.cpp index 3c9c4de..a3ccdbf 100644 --- a/scl/scluibuilder.cpp +++ b/scl/scluibuilder.cpp @@ -378,7 +378,7 @@ CSCLUIBuilder::draw_button(const sclwindow window, scldrawctx draw_ctx, const sc * @remark draw_button */ sclboolean -CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state, const sclboolean shift) +CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, SCLButtonState state, SCLShiftState shift) { SCL_DEBUG(); @@ -675,7 +675,7 @@ CSCLUIBuilder::draw_button_bg_by_sw(const sclwindow window, const scldrawctx dra * @remark draw_button */ sclboolean -CSCLUIBuilder::draw_button_bg_by_img(const sclwindow window, const scldrawctx draw_ctx,const scl16 key_index, const SCLButtonState state, const sclboolean shift) +CSCLUIBuilder::draw_button_bg_by_img(const sclwindow window, const scldrawctx draw_ctx, scl16 key_index, SCLButtonState state, SCLShiftState shift) { SCL_DEBUG(); @@ -1035,7 +1035,7 @@ CSCLUIBuilder::show_magnifier(const sclwindow window, scldrawctx draw_ctx) if (magnifier_configure->show_shift_label) { shiftidx = SCL_SHIFT_STATE_ON; } - if (coordinate->use_long_key_magnifier && state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY || + if ((coordinate->use_long_key_magnifier && state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY) || state->get_cur_action_state() == ACTION_STATE_POPUP_LONGKEY) { const sclchar* targetstr = coordinate->long_key_value; const sclchar* customstr = context->get_custom_magnifier_label(context->get_last_touch_device_id(), loop); diff --git a/scl/scluiimpl.cpp b/scl/scluiimpl.cpp index c83acf9..2cdf382 100644 --- a/scl/scluiimpl.cpp +++ b/scl/scluiimpl.cpp @@ -113,8 +113,6 @@ CSCLUIImpl::show() { SCL_DEBUG(); - sclboolean ret = FALSE; - if (m_initialized) { CSCLUtils *utils = CSCLUtils::get_instance(); CSCLWindows *windows = CSCLWindows::get_instance(); @@ -125,8 +123,6 @@ CSCLUIImpl::show() //if (auto_relocate) { if (TRUE) { /* Let's relocate our base window - bottomed center aligned */ - sclint width, height; - //get_layout_size(&width, &height); SclRectangle rect = get_main_window_rect(); sclint scrx, scry; @@ -154,8 +150,6 @@ CSCLUIImpl::hide() { SCL_DEBUG(); - sclboolean ret = FALSE; - if (m_initialized) { CSCLController *controller = CSCLController::get_instance(); CSCLWindows *windows = CSCLWindows::get_instance(); @@ -176,8 +170,6 @@ CSCLUIImpl::set_ui_event_callback(ISCLUIEventCallback *callback, const sclchar * { SCL_DEBUG(); - sclboolean ret = FALSE; - if (m_initialized) { CSCLEventHandler *handler = CSCLEventHandler::get_instance(); if (handler) { @@ -243,8 +235,6 @@ CSCLUIImpl::set_rotation(SCLRotation rotation) //if (auto_relocate) { if (TRUE) { /* Let's relocate our base window - bottomed center aligned */ - sclint width, height; - //get_layout_size(&width, &height); SclRectangle rect = get_main_window_rect(); sclint scrx, scry; @@ -351,8 +341,6 @@ void CSCLUIImpl::unset_private_key(const sclchar* custom_id) { SCL_DEBUG(); - sclboolean ret = FALSE; - if (m_initialized) { CSCLResourceCache *cache = CSCLResourceCache::get_instance(); if (cache) { @@ -453,8 +441,6 @@ void CSCLUIImpl::notify_app_focus_changed() { SCL_DEBUG(); - sclboolean ret = FALSE; - if (m_initialized) { CSCLController *controller = CSCLController::get_instance(); if (controller) { @@ -467,8 +453,6 @@ void CSCLUIImpl::reset_popup_timeout() { SCL_DEBUG(); - sclboolean ret = FALSE; - if (m_initialized) { CSCLEvents *events = CSCLEvents::get_instance(); CSCLWindows *windows = CSCLWindows::get_instance(); @@ -500,8 +484,6 @@ void CSCLUIImpl::close_all_popups() { SCL_DEBUG(); - sclboolean ret = FALSE; - if (m_initialized) { CSCLWindows *windows = CSCLWindows::get_instance(); if (windows) { @@ -669,8 +651,6 @@ CSCLUIImpl::get_input_mode_size(const sclchar *input_mode, SCLDisplayMode displa void CSCLUIImpl::get_screen_resolution(sclint *width, sclint *height) { - sclboolean ret = FALSE; - if (m_initialized) { CSCLUtils *utils = CSCLUtils::get_instance(); if (utils && width && height) { @@ -684,8 +664,6 @@ CSCLUIImpl::get_screen_resolution(sclint *width, sclint *height) void CSCLUIImpl::set_debug_mode(SCLDebugMode mode) { - sclboolean ret = FALSE; - if (m_initialized) { CSCLController *controller = CSCLController::get_instance(); if (controller) { @@ -710,8 +688,6 @@ CSCLUIImpl::get_debug_mode() void CSCLUIImpl::set_update_pending(sclboolean pend) { - sclboolean ret = FALSE; - if (m_initialized) { CSCLWindows *windows = CSCLWindows::get_instance(); if (windows) { @@ -723,8 +699,6 @@ CSCLUIImpl::set_update_pending(sclboolean pend) void CSCLUIImpl::enable_button(const sclchar* custom_id, sclboolean enabled) { - sclboolean ret = FALSE; - if (m_initialized) { CSCLResourceCache *cache = CSCLResourceCache::get_instance(); if (cache) { @@ -834,8 +808,6 @@ CSCLUIImpl::set_button_delay_duration(scllong msc) void CSCLUIImpl::enable_magnifier(sclboolean enabled) { - sclboolean ret = FALSE; - if (m_initialized) { CSCLContext *context = CSCLContext::get_instance(); if (context) { @@ -847,8 +819,6 @@ CSCLUIImpl::enable_magnifier(sclboolean enabled) void CSCLUIImpl::enable_sound(sclboolean enabled) { - sclboolean ret = FALSE; - if (m_initialized) { CSCLContext *context = CSCLContext::get_instance(); if (context) { @@ -860,8 +830,6 @@ CSCLUIImpl::enable_sound(sclboolean enabled) void CSCLUIImpl::enable_vibration(sclboolean enabled) { - sclboolean ret = FALSE; - if (m_initialized) { CSCLContext *context = CSCLContext::get_instance(); if (context) { @@ -873,8 +841,6 @@ CSCLUIImpl::enable_vibration(sclboolean enabled) void CSCLUIImpl::enable_tts(sclboolean enabled) { - sclboolean ret = FALSE; - if (m_initialized) { CSCLContext *context = CSCLContext::get_instance(); if (context) { @@ -886,8 +852,6 @@ CSCLUIImpl::enable_tts(sclboolean enabled) void CSCLUIImpl::enable_shift_multi_touch(sclboolean enabled) { - sclboolean ret = FALSE; - if (m_initialized) { CSCLContext *context = CSCLContext::get_instance(); if (context) { @@ -908,8 +872,6 @@ CSCLUIImpl::enable_touch_offset(sclboolean enabled) void CSCLUIImpl::disable_input_events(sclboolean disabled) { - sclboolean ret = FALSE; - if (m_initialized) { CSCLController *controller = CSCLController::get_instance(); if (controller) { diff --git a/scl/utils/linux/sclutils-linux.cpp b/scl/utils/linux/sclutils-linux.cpp index 9b727a9..98e7c85 100644 --- a/scl/utils/linux/sclutils-linux.cpp +++ b/scl/utils/linux/sclutils-linux.cpp @@ -40,7 +40,6 @@ static tts_h tts = NULL; static Eina_Bool _get_default_zone_geometry_info (Ecore_X_Window root, scluint *x, scluint *y, scluint *w, scluint *h) { Ecore_X_Atom zone_geometry_atom; - Ecore_X_Window default_zone; Ecore_X_Window* zone_lists; sclint num_zone_lists; sclint num_ret; @@ -160,6 +159,7 @@ CSCLUtilsImplLinux::get_screen_resolution(sclint *x, sclint *y) { static Evas_Coord scr_w = 0, scr_h = 0; if (scr_w == 0 || scr_h == 0) { scluint w, h; + w = h = 0; if (_get_default_zone_geometry_info(ecore_x_window_root_first_get(), NULL, NULL, &w, &h)) { scr_w = w; scr_h = h; diff --git a/xml2binary/CMakeLists.txt b/xml2binary/CMakeLists.txt index 64c4925..c670682 100644 --- a/xml2binary/CMakeLists.txt +++ b/xml2binary/CMakeLists.txt @@ -30,8 +30,6 @@ SET(SRCS ../res/simple_debug.cpp ) -SET(PACKAGE ${PROJECT_NAME}) -SET(PKGNAME ${PACKAGE}) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(BINDIR "${PREFIX}/bin") SET(METADATADIR "${PREFIX}/share/libscl-ui") @@ -61,9 +59,6 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -fpie -Wall") SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -g") -ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"") -ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"") - ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS}) diff --git a/xml2binary/encode_label_properties_frame.cpp b/xml2binary/encode_label_properties_frame.cpp index 3f3a5d3..081bb4f 100644 --- a/xml2binary/encode_label_properties_frame.cpp +++ b/xml2binary/encode_label_properties_frame.cpp @@ -80,10 +80,6 @@ encode_label_properties_record(ResourceStorage& storage, const PSclLabelProperti } } -static bool isEmptyRecord(const SclLayoutKeyCoordinate& cur) { - return (cur.x == 0 && cur.y == 0 && cur.width == 0 && cur.height == 0); -} - int encode_label_properties_frame_file(ResourceStorage& storage, IMetaData_Helper& md_helper) { diff --git a/xml2binary/include/resource_storage_impl.h b/xml2binary/include/resource_storage_impl.h index ea7b66a..cb4620f 100644 --- a/xml2binary/include/resource_storage_impl.h +++ b/xml2binary/include/resource_storage_impl.h @@ -143,7 +143,7 @@ check_storage(int width) { inline void ResourceStorage:: expand_storage() { unsigned int _new_size = (unsigned int)(m_capability + __RE_NEW_LENGTH__); - if (_new_size > __MAX_NEW_SIZE__) { + if (_new_size > (unsigned int)__MAX_NEW_SIZE__) { printf("expand_storage failed: size is limited to %d\n", __MAX_NEW_SIZE__); return; } diff --git a/xml2binary/metadata_handler.cpp b/xml2binary/metadata_handler.cpp index 108dcf6..9a363fc 100644 --- a/xml2binary/metadata_handler.cpp +++ b/xml2binary/metadata_handler.cpp @@ -64,7 +64,7 @@ get_width(const char* field_name) const{ if (field_name == NULL) return 0; int idx = m_current_metadata_record_id; - if (idx < 0 || idx > metadata.m_vec_metadata_record.size()) return 0; + if (idx < 0 || idx > (int)metadata.m_vec_metadata_record.size()) return 0; const MetaData_Record& metadata_record = metadata.m_vec_metadata_record.at(idx); @@ -76,7 +76,7 @@ get_width(const char* field_name) const{ const unsigned short MetaData_Handler:: get_width(const char* name, const MetaData_Record& metadata_record) const{ assert(name); - for (int i = 0; i < metadata_record.vField.size(); ++i) { + for (size_t i = 0; i < metadata_record.vField.size(); ++i) { if ( 0 == strcmp(name, metadata_record.vField.at(i).m_name)) { return metadata_record.vField.at(i).m_width; } @@ -88,7 +88,7 @@ const int MetaData_Handler:: find_metadata_record_index(const char* name)const{ assert(name); - for ( int i = 0; i < metadata.m_vec_metadata_record.size(); ++i) { + for ( size_t i = 0; i < metadata.m_vec_metadata_record.size(); ++i) { const MetaData_Record& metadata_record = metadata.m_vec_metadata_record.at(i); if (0 == strcmp(metadata_record.m_name, name)) { diff --git a/xmlresource/label_properties_parser.cpp b/xmlresource/label_properties_parser.cpp index 64ceea3..361766e 100644 --- a/xmlresource/label_properties_parser.cpp +++ b/xmlresource/label_properties_parser.cpp @@ -45,7 +45,7 @@ match_alignment(const char* key) { int value = LABEL_ALIGN_LEFT_TOP; - for(int i = 0; i < sizeof(table)/sizeof(Match_table_t); ++i) { + for(size_t i = 0; i < sizeof(table)/sizeof(Match_table_t); ++i) { if (0 == strcmp(key, table[i].key)) { value = table[i].value; @@ -80,7 +80,7 @@ match_shadow_direction(const char* key) { int value = SHADOW_DIRECTION_NONE; - for(int i = 0; i < sizeof(table)/sizeof(Match_table_t); ++i) { + for(size_t i = 0; i < sizeof(table)/sizeof(Match_table_t); ++i) { if (0 == strcmp(key, table[i].key)) { value = table[i].value; diff --git a/xmlresource/layout_parser.cpp b/xmlresource/layout_parser.cpp index 26077d2..3eda541 100644 --- a/xmlresource/layout_parser.cpp +++ b/xmlresource/layout_parser.cpp @@ -324,7 +324,7 @@ LayoutParserImpl::add_layout_string(xmlChar* newstr) { void LayoutParserImpl::release_layout_strings() { - for(int loop = 0;loop < m_vec_layout_strings.size();loop++) { + for(size_t loop = 0; loop < m_vec_layout_strings.size(); loop++) { if (m_vec_layout_strings[loop]) { xmlFree(m_vec_layout_strings[loop]); } @@ -341,7 +341,7 @@ LayoutParserImpl::add_key_string(xmlChar* newstr) { void LayoutParserImpl::release_key_strings() { - for(int loop = 0;loop < m_vec_key_strings.size();loop++) { + for(size_t loop = 0; loop < m_vec_key_strings.size(); loop++) { if (m_vec_key_strings[loop]) { xmlFree(m_vec_key_strings[loop]); } @@ -675,11 +675,8 @@ LayoutParserImpl::parsing_layout_node( set_default_layout_value(cur_rec_layout); - int row_y = 0; xmlChar* key; - SclLayoutKeyCoordinatePointer *cur_key = &m_key_coordinate_pointer_frame[layout_no][0]; - if (equal_prop(cur_node, LAYOUT_DIRECTION_ATTRIBUTE, LAYOUT_DIRECTION_ATTRIBUTE_LANDSCAPE_VALUE)) { cur_rec_layout->display_mode = DISPLAYMODE_LANDSCAPE; @@ -759,7 +756,6 @@ LayoutParserImpl::loading_coordinate_resources( assert(cur_node != NULL); int row_y = 0; - xmlChar* key; SclLayoutKeyCoordinatePointer *cur_key = &m_key_coordinate_pointer_frame[layout_no][0]; @@ -838,7 +834,7 @@ LayoutParserImpl::get_drag_state_prop(const xmlNodePtr cur_node) { int drag_state = SCL_DRAG_STATE_NONE; - for(int i = 0; i < sizeof(table)/sizeof(Match_Struct); ++i) { + for(size_t i = 0; i < sizeof(table)/sizeof(Match_Struct); ++i) { if (0 == strcmp((const char*)key, table[i].key)) { drag_state = table[i].value; @@ -901,7 +897,7 @@ LayoutParserImpl::get_multitouch_type_prop(const xmlNodePtr cur_node) { int type = SCL_MULTI_TOUCH_TYPE_EXCLUSIVE; - for(int i = 0; i < sizeof(table)/sizeof(Match_Struct); ++i) { + for(size_t i = 0; i < sizeof(table)/sizeof(Match_Struct); ++i) { if (0 == strcmp((const char*)key, table[i].key)) { type = table[i].value; @@ -936,7 +932,7 @@ LayoutParserImpl::get_extra_option_prop( int type = DIRECTION_EXTRA_OPTION_4_DIRECTIONS; - for(int i = 0; i < sizeof(table)/sizeof(Match_Struct); ++i) { + for(size_t i = 0; i < sizeof(table)/sizeof(Match_Struct); ++i) { if (0 == strcmp((const char*)key, table[i].key)) { type = table[i].value; diff --git a/xmlresource/main_entry_parser.cpp b/xmlresource/main_entry_parser.cpp index 5a587c8..1e0874d 100644 --- a/xmlresource/main_entry_parser.cpp +++ b/xmlresource/main_entry_parser.cpp @@ -33,19 +33,16 @@ class MainEntryParserImpl { doc = xmlReadFile(input_file, NULL, 0); if (doc == NULL) { - SCLLOG(SclLog::DEBUG, "Could not load file: %s.", input_file); return -1; } cur_node = xmlDocGetRootElement(doc); if (cur_node == NULL) { - SCLLOG(SclLog::DEBUG, "MainEntryParser: empty document.\n"); xmlFreeDoc(doc); return -1; } if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)"main-entry")) { - SCLLOG(SclLog::DEBUG, "MainEntryParser: root name error: %s\n!", (char *)cur_node->name); xmlFreeDoc(doc); return -1; } @@ -111,9 +108,7 @@ MainEntryParser::MainEntryParser() { MainEntryParser::~MainEntryParser() { if (m_impl) { - SCLLOG(SclLog::MESSAGE, "~MainEntryParser() has called"); delete m_impl; - m_impl = NULL; } } diff --git a/xmlresource/modifier_decoration_parser.cpp b/xmlresource/modifier_decoration_parser.cpp index 42e2ac8..9060a29 100644 --- a/xmlresource/modifier_decoration_parser.cpp +++ b/xmlresource/modifier_decoration_parser.cpp @@ -80,7 +80,7 @@ get_key_modifier_state_prop(const char* key ) { int key_modifier_state = KEY_MODIFIER_NONE; - for(int i = 0; i < sizeof(table)/sizeof(Key_modifier_state_match_table_t); ++i) { + for(size_t i = 0; i < sizeof(table)/sizeof(Key_modifier_state_match_table_t); ++i) { if (0 == strcmp(key, table[i].key) ) { key_modifier_state = table[i].key_modifier_state; diff --git a/xmlresource/xmlresource.cpp b/xmlresource/xmlresource.cpp index c872c03..27f0a3c 100644 --- a/xmlresource/xmlresource.cpp +++ b/xmlresource/xmlresource.cpp @@ -61,8 +61,6 @@ get_layout_files(char **layout_files, int* size) { InputModeConfigParser *input_mode_configure_parser = InputModeConfigParser::get_instance(); for(int inputmode = 0; inputmode < MAX_SCL_INPUT_MODE; inputmode++) { - int empty_index; - const sclchar* cur_layout_file; PSclInputModeConfigure configure_table = input_mode_configure_parser->get_input_mode_configure_table(); SclInputModeConfigure& cur_input_mode_configure = configure_table[inputmode];