Remove GCC warnings

This commit is contained in:
Duilio Protti 2016-02-14 11:08:00 -03:00
parent f796d7a7d6
commit 3f172805f4
6 changed files with 13 additions and 12 deletions

View File

@ -1,5 +1,6 @@
#include "config.h"
#include "config-dialog.h"
#include "infconfig.h"
#include "gettext.h"

View File

@ -138,17 +138,17 @@ int mm_support_check_and_show()
}
msg = g_strdup("Infinity: Looking for Multimedia Extensions Support...");
if (r & MM_MMX) {
tmp = g_strconcat(msg, " MMX", 0);
tmp = g_strconcat(msg, " MMX", NULL);
g_free(msg);
msg = tmp;
}
if (r & MM_3DNOW) {
tmp = g_strconcat(msg, " 3DNOW", 0);
tmp = g_strconcat(msg, " 3DNOW", NULL);
g_free(msg);
msg = tmp;
}
if (r & MM_MMXEXT) {
tmp = g_strconcat(msg, " MMX2", 0);
tmp = g_strconcat(msg, " MMX2", NULL);
g_free(msg);
msg = tmp;
}
@ -165,10 +165,10 @@ int mm_support_check_and_show()
* msg = tmp;
* }
*/
tmp = g_strconcat(msg, " detected", 0);
tmp = g_strconcat(msg, " detected", NULL);
g_free(msg);
msg = tmp;
g_message(msg);
g_message("%s", msg);
g_free(msg);
return r;

View File

@ -69,6 +69,8 @@
* initializer for static 'char[]' or 'const char[]' variables. */
#define gettext_noop(String) String
#ifndef _
#define _(String) (gettext(String))
#endif
#endif /* _LIBGETTEXT_H */

View File

@ -8,9 +8,7 @@
#include "gettext.h"
#include "config-dialog.h"
//#define DEFAULT_WIDTH 500
#define DEFAULT_WIDTH 512
//#define DEFAULT_HEIGHT 375
#define DEFAULT_HEIGHT 288
#define DEFAULT_TIME_EFFECT 100
#define DEFAULT_TIME_PALETTE 100
@ -201,13 +199,12 @@ static void connect_callbacks(ConfigDialog *configure_dialog)
void config_plugin_load_prefs(void)
{
gint value;
//gboolean bvalue;
GKeyFile *kf;
gchar *config_file_path;
gboolean error, must_update, config_file_usable;
kf = g_key_file_new();
config_file_path = g_strconcat(g_get_home_dir(), INFINITY_CONFIG_FILE, 0);
config_file_path = g_strconcat(g_get_home_dir(), INFINITY_CONFIG_FILE, NULL);
config_file_usable = g_key_file_load_from_file(kf, config_file_path, G_KEY_FILE_KEEP_COMMENTS, NULL);
error = must_update = FALSE;
if (config_file_usable) {
@ -275,8 +272,8 @@ void config_plugin_save_prefs(void)
gsize length;
kf = g_key_file_new();
config_dir_path = g_strconcat(g_get_home_dir(), INFINITY_CONFIG_DIR, 0);
config_file_path = g_strconcat(g_get_home_dir(), INFINITY_CONFIG_FILE, 0);
config_dir_path = g_strconcat(g_get_home_dir(), INFINITY_CONFIG_DIR, NULL);
config_file_path = g_strconcat(g_get_home_dir(), INFINITY_CONFIG_FILE, NULL);
ok = g_key_file_load_from_file(kf, config_file_path, G_KEY_FILE_KEEP_COMMENTS, NULL);
if (!ok) {
g_message(_("Infinity plugin .ini file not found"));

View File

@ -26,6 +26,7 @@
#include <glib/gi18n.h>
#include "config.h"
#include "gettext.h"
#include "infconfig.h"
#include "renderer.h"

View File

@ -359,7 +359,7 @@ static void check_events()
if (t_last_color > 32) {
t_last_color = 0;
old_color = color;
color = ++color % NB_PALETTES;
color = (color + 1) % NB_PALETTES;
}
break;
case SDLK_SPACE: