src/newgrf_gui.cpp
changeset 9191 ae14770c829a
parent 9087 c6ff1721bb00
child 9245 ea89c79affde
--- a/src/newgrf_gui.cpp	Sat Mar 15 00:31:10 2008 +0000
+++ b/src/newgrf_gui.cpp	Sat Mar 15 13:21:31 2008 +0000
@@ -179,7 +179,7 @@
 					const GRFConfig *c;
 					uint i = (e->we.click.pt.y - w->widget[ANGRFW_GRF_LIST].top) / 10 + w->vscroll.pos;
 
-					for (c = _all_grfs; c != NULL && i > 0; c = c->next, i--);
+					for (c = _all_grfs; c != NULL && i > 0; c = c->next, i--) {}
 					WP(w, newgrf_add_d).sel = c;
 					SetWindowDirty(w);
 					break;
@@ -304,7 +304,7 @@
 	const GRFConfig *c;
 	int i;
 
-	for (c = *WP(w, newgrf_d).list, i = 0; c != NULL; c = c->next, i++);
+	for (c = *WP(w, newgrf_d).list, i = 0; c != NULL; c = c->next, i++) {}
 
 	w->vscroll.cap = (w->widget[SNGRFS_FILE_LIST].bottom - w->widget[SNGRFS_FILE_LIST].top) / 14 + 1;
 	SetVScrollCount(w, i);
@@ -327,9 +327,9 @@
 		ReloadNewGRFData();
 
 		/* Show new, updated list */
-		for (c = *nd->list; c != NULL && c != nd->sel; c = c->next, i++);
+		for (c = *nd->list; c != NULL && c != nd->sel; c = c->next, i++) {}
 		CopyGRFConfigList(nd->list, *nd->orig_list, false);
-		for (c = *nd->list; c != NULL && i > 0; c = c->next, i--);
+		for (c = *nd->list; c != NULL && i > 0; c = c->next, i--) {}
 		nd->sel = c;
 
 		SetWindowDirty(w);
@@ -474,7 +474,7 @@
 					GRFConfig *c;
 					uint i = (e->we.click.pt.y - w->widget[SNGRFS_FILE_LIST].top) / 14 + w->vscroll.pos;
 
-					for (c = *WP(w, newgrf_d).list; c != NULL && i > 0; c = c->next, i--);
+					for (c = *WP(w, newgrf_d).list; c != NULL && i > 0; c = c->next, i--) {}
 					WP(w, newgrf_d).sel = c;
 
 					SetWindowDirty(w);