summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBradley Smith2008-03-08 00:41:15 +0000
committerBradley Smith2008-03-08 00:41:15 +0000
commit19a9f6592f2ea08a2efdadc8ec08a96cad201720 (patch)
tree0c7435f3a8dd1afdcf86a0d890a36a5aae27073a /src
parentAdd myself to copyright in changed files, and correct address. (diff)
downloadgnurobots-19a9f6592f2ea08a2efdadc8ec08a96cad201720.tar.gz
Add -Wall and -Wfatal-errors compile flags, and correct code to compile cleanly.
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/grobot.c3
-rw-r--r--src/main.c6
-rw-r--r--src/map.c3
3 files changed, 6 insertions, 6 deletions
diff --git a/src/grobot.c b/src/grobot.c
index 03b7e0e..f54224d 100644
--- a/src/grobot.c
+++ b/src/grobot.c
@@ -24,6 +24,9 @@
#include "userinterface.h" /* GNU Robots UI */
#include <stdio.h>
#include <glib.h>
+#include <string.h>
+#include <stdlib.h>
+#include "sign.h"
enum
{
diff --git a/src/main.c b/src/main.c
index 0359ba3..960d8cc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -26,6 +26,7 @@
#include <string.h> /* for strdup */
#include <glib.h>
+#include <glib/gprintf.h>
#include <gmodule.h>
#include <libguile.h>
@@ -61,6 +62,7 @@ GModule *plugin;
UserInterface *load_ui_module (gchar *module_name, Map *map);
SCM catch_handler (void *data, SCM tag, SCM throw_args);
+gint is_file_readable (const gchar *filename);
/************************************************************************
* gint main(gint argc, gchar *argv[]) *
@@ -296,7 +298,6 @@ main (gint argc, gchar *argv[])
void
main_prog (void *closure, gint argc, gchar *argv[])
{
- gint i;
gchar *map_file = argv[1];
gchar *robot_program = argv[2];
gchar *module = argv[3];
@@ -402,13 +403,12 @@ load_ui_module (gchar *module_name, Map *map)
gchar module_full_name[MODULE_NAME_MAX];
gchar module_path[MODULE_PATH_MAX];
gchar *module_full_path;
- gint errors = 0;
const char *path = getenv (MODULE_PATH_ENV);
if (!g_module_supported ())
{
g_printf ("load_ui_module: %s\n", g_module_error ());
- return;
+ return NULL;
}
if (path != NULL)
diff --git a/src/map.c b/src/map.c
index ac47d79..6dd1a28 100644
--- a/src/map.c
+++ b/src/map.c
@@ -270,10 +270,7 @@ map_get_property (GObject *object, guint prop_id,
Map *
map_new_from_file (const gchar *map_file, gint num_rows, gint num_cols)
{
- GObject *object;
Map *map;
- gint **buf;
- guint i;
FILE *stream;
MapSize size;