comparison console/libgnt/gntwm.c @ 15157:67ccc195074b

[gaim-migrate @ 17943] Get rid of two minor compile warnings committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 10 Dec 2006 09:09:39 +0000
parents 2409a2508650
children 92ebda7a7afc
comparison
equal deleted inserted replaced
15156:e9b034a7d218 15157:67ccc195074b
189 #if GLIB_CHECK_VERSION(2,6,0) 189 #if GLIB_CHECK_VERSION(2,6,0)
190 GKeyFile *gfile = g_key_file_new(); 190 GKeyFile *gfile = g_key_file_new();
191 char *filename = g_build_filename(g_get_home_dir(), ".gntpositions", NULL); 191 char *filename = g_build_filename(g_get_home_dir(), ".gntpositions", NULL);
192 GError *error = NULL; 192 GError *error = NULL;
193 char **keys; 193 char **keys;
194 int nk; 194 gsize nk;
195 195
196 if (!g_key_file_load_from_file(gfile, filename, G_KEY_FILE_NONE, &error)) { 196 if (!g_key_file_load_from_file(gfile, filename, G_KEY_FILE_NONE, &error)) {
197 g_printerr("GntWM: %s\n", error->message); 197 g_printerr("GntWM: %s\n", error->message);
198 g_error_free(error); 198 g_error_free(error);
199 g_free(filename); 199 g_free(filename);
206 g_error_free(error); 206 g_error_free(error);
207 error = NULL; 207 error = NULL;
208 } else { 208 } else {
209 while (nk--) { 209 while (nk--) {
210 char *title = keys[nk]; 210 char *title = keys[nk];
211 int l; 211 gsize l;
212 char **coords = g_key_file_get_string_list(gfile, "positions", title, &l, NULL); 212 char **coords = g_key_file_get_string_list(gfile, "positions", title, &l, NULL);
213 if (l == 2) { 213 if (l == 2) {
214 int x = atoi(coords[0]); 214 int x = atoi(coords[0]);
215 int y = atoi(coords[1]); 215 int y = atoi(coords[1]);
216 GntPosition *p = g_new0(GntPosition, 1); 216 GntPosition *p = g_new0(GntPosition, 1);