~jan-kneschke/mysql-proxy/packet-tracking-assertions

« back to all changes in this revision

Viewing changes to src/chassis-options.c

  • Committer: jan at mysql
  • Date: 2010-07-06 14:46:24 UTC
  • Revision ID: jan@mysql.com-20100706144624-k9djcky0tcr0jqhl
silence gcc-warning "warning: passing argument 1 of 'g_free' discards qualifiers from pointer target type"

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
                return;
179
179
 
180
180
        for (entries_copy = entries; entries_copy->long_name != NULL; entries_copy++) {
181
 
                if (NULL != entries_copy->long_name) g_free(entries_copy->long_name);
182
 
                if (NULL != entries_copy->description) g_free(entries_copy->description);
183
 
                if (NULL != entries_copy->arg_description) g_free(entries_copy->arg_description);
 
181
                /* type-cast to 'char *' to silence gcc's warning:
 
182
                 *
 
183
                 *   warning: passing argument 1 of 'g_free' discards qualifiers from pointer target type
 
184
                 *
 
185
                 * as the declaration of GOptionEntry is a 'const char *'
 
186
                 */
 
187
                if (NULL != entries_copy->long_name) g_free((char *)entries_copy->long_name);
 
188
                if (NULL != entries_copy->description) g_free((char *)entries_copy->description);
 
189
                if (NULL != entries_copy->arg_description) g_free((char *)entries_copy->arg_description);
184
190
        }
185
191
 
186
192
        g_free(entries);