Bug #19278 myx_util_functions.c:588: warning: statement with no effect
Submitted: 22 Apr 2006 15:40 Modified: 26 Apr 2006 17:51
Reporter: John Yodsnukis (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Preview Severity:S3 (Non-critical)
Version:1.0.6beta svn revision 1275 OS:Linux (Linux (Gentoo on PPC))
Assigned to: CPU Architecture:Any

[22 Apr 2006 15:40] John Yodsnukis
Description:
myx_util_functions.c: In function `strlist_g_append_or_replace':
myx_util_functions.c:1697: warning: passing arg 1 of `strlist_g_indexof' from incompatible pointer type
myx_util_functions.c: In function `utf8_str_trim':
myx_util_functions.c:588: warning: statement with no effect

additionally myx_util_functions.c contains the following comment above line 588:

 //XXX
   // the following line and (g_utf8_next_char()) won't do anything
   // whoever wrote it, please check what's really intended and fix (or remove)

How to repeat:
compile from svn.

Suggested fix:
--- mysql-gui-common/library_util/source/myx_util_functions.c	(revision 1235)
+++ mysql-gui-common/library_util/source/myx_util_functions.c	(working copy)
@@ -575,7 +575,7 @@
 //XXX
   // the following line and (g_utf8_next_char()) won't do anything
   // whoever wrote it, please check what's really intended and fix (or remove)
-  g_utf8_prev_char(pos);
+//g_utf8_prev_char(pos);
   for ( symbol= g_utf8_get_char(pos);  
         g_unichar_isspace(symbol);
         symbol= g_utf8_get_char(pos))
@@ -585,7 +585,7 @@
     if (pos==start)
       break;
   }
-  g_utf8_next_char(pos);
+//g_utf8_next_char(pos);
   finish= pos;
   new_len= finish-start;
 
@@ -1694,7 +1694,7 @@
 
 void strlist_g_append_or_replace(char ***list, char *value)
 {
-  int i= strlist_g_indexof(*list, value);
+  int i= strlist_g_indexof((const char**) *list, value);
   if(i < 0)
   {
     strlist_g_append(list, value);
[26 Apr 2006 17:51] Alfredo Kojima
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html