Bug #44906 Missing return statements
Submitted: 15 May 2009 16:29 Modified: 2 Jun 2009 2:17
Reporter: Michal Hrusecky Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.1.12 OS:Linux
Assigned to: Alfredo Kojima CPU Architecture:Any
Tags: CHECKED, Contribution

[15 May 2009 16:29] Michal Hrusecky
Description:
During compilation of MySQL Workbench, there are warnings that some functions which are of non-void type misses return statement. Suggested patch included. It should show where exactly are these return statements missing.

How to repeat:
Try to compile MySQL workbench and watch warnings carefully.

Suggested fix:
Index: frontend/linux/workbench/toolbar_manager.cpp
===================================================================
--- frontend/linux/workbench/toolbar_manager.cpp.orig
+++ frontend/linux/workbench/toolbar_manager.cpp
@@ -309,7 +309,9 @@ bool ToolbarManager::on_searchitem_key_r
   {
     _search_text = e->get_text();
     _be->activate_command("builtin:searchbox");
+    return true;
   }
+  return false;
 }
 
   
Index: plugins/db.mysql.editors/linux/mysql_routinegroup_editor_fe.cpp
===================================================================
--- plugins/db.mysql.editors/linux/mysql_routinegroup_editor_fe.cpp.orig
+++ plugins/db.mysql.editors/linux/mysql_routinegroup_editor_fe.cpp
@@ -137,6 +137,7 @@ bool DbMySQLRoutineGroupEditor::switch_e
   refresh_form_data();
   
   delete old_be;
+  return true;
 }
 
 //------------------------------------------------------------------------------
[15 May 2009 21:26] MySQL Verification Team
Thank you for the bug report.
[2 Jun 2009 2:17] Alfredo Kojima
Thanks for the report.