Resolve warnings.
authorChristoph Mallon <christoph.mallon@gmx.de>
Thu, 11 Dec 2008 12:38:01 +0000 (12:38 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 11 Dec 2008 12:38:01 +0000 (12:38 +0000)
[r24524]

driver/firm_cmdline.c
driver/firm_opt.c
driver/gen_firm_asm.c
mangle.c
preprocessor.c
type_hash.c

index bab94ef..a004be6 100644 (file)
@@ -414,6 +414,7 @@ int firm_be_option(const char *opt) {
 #ifdef FIRM_BACKEND
   return be_parse_arg(opt);
 #else
+  (void)opt;
   return 0;
 #endif /* FIRM_BACKEND */
 }  /* firm_be_option */
index 27159f2..5843af7 100644 (file)
@@ -27,7 +27,7 @@
 #if defined(_DEBUG) || defined(FIRM_DEBUG)
 #define DBG(x)  dbg_printf x
 #else
-#define DBG(x)
+#define DBG(x) ((void)0)
 #endif /* _DEBUG || FIRM_DEBUG */
 
 
index 2b49b94..3a96eac 100644 (file)
@@ -241,7 +241,7 @@ static int generate_predef_node(FILE *f, ir_node *n)
   else if (n == code)                   \
     name(f, "  ", n, " = " #code ";\n");
 
-  if (0);
+  if (0) {}
   X(get_irg_start(irg))
   X(get_irg_start_block(irg))
   X(get_irg_end(irg))
index 1eb6a16..bcd78d6 100644 (file)
--- a/mangle.c
+++ b/mangle.c
@@ -222,7 +222,6 @@ static void mangle_type(type_t *orig_type)
 
        case TYPE_BITFIELD:
                panic("no mangling for this type implemented yet");
-               break;
        }
        panic("invalid type encountered while mangling");
 }
index 2d9a1a4..7ba8282 100644 (file)
@@ -85,7 +85,6 @@ static pp_definition_t   *current_expansion  = NULL;
 static inline void next_char(void);
 static void next_preprocessing_token(void);
 static void print_line_directive(const source_position_t *pos, const char *add);
-static void print_spaces(void);
 
 static bool open_input(const char *filename)
 {
@@ -1251,7 +1250,7 @@ static void print_quoted_string(const char *const string)
 
 static void print_line_directive(const source_position_t *pos, const char *add)
 {
-       fprintf(out, "# %d ", pos->linenr);
+       fprintf(out, "# %u ", pos->linenr);
        print_quoted_string(pos->input_name);
        if (add != NULL) {
                fputc(' ', out);
index ea88153..9635488 100644 (file)
@@ -92,8 +92,6 @@ static unsigned hash_compound_type(const compound_type_t *type)
        return hash_ptr(type->compound);
 }
 
-static unsigned hash_type(const type_t *type);
-
 static unsigned hash_function_type(const function_type_t *type)
 {
        unsigned result = hash_ptr(type->return_type);