summaryrefslogtreecommitdiffhomepage
path: root/ir/obstack
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2010-11-04 13:15:30 +0100
committerMatthias Braun <matze@braunis.de>2010-11-04 13:15:30 +0100
commitce6161a7e42a48f7422b7babcc64d8ace18e2687 (patch)
tree2fa5272f9220c4e08a5309057f44646fb9f882a7 /ir/obstack
parentfd269bc519af571ad9a96afd65bcd504f3034f8b (diff)
make firm compilable with a c++ compiler
[r28127]
Diffstat (limited to 'ir/obstack')
-rw-r--r--ir/obstack/obstack_printf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ir/obstack/obstack_printf.c b/ir/obstack/obstack_printf.c
index c1d754f..7ade5ef 100644
--- a/ir/obstack/obstack_printf.c
+++ b/ir/obstack/obstack_printf.c
@@ -6,7 +6,7 @@
#ifdef _WIN32
/* win32/C89 has no va_copy function... so we have to use the stupid fixed-length version */
-int obstack_vprintf(struct obstack *obst, const char *fmt, va_list ap)
+int obstack_vprintf(struct obstack *obst, const char *fmt, va_list ap) FIRM_NOTHROW
{
char buf[16384];
int len = _vsnprintf(buf, sizeof(buf), fmt, ap);
@@ -14,7 +14,7 @@ int obstack_vprintf(struct obstack *obst, const char *fmt, va_list ap)
return len;
}
#else
-int obstack_vprintf(struct obstack *obst, const char *fmt, va_list ap)
+int obstack_vprintf(struct obstack *obst, const char *fmt, va_list ap) FIRM_NOTHROW
{
char buf[128];
char *buffer = buf;
@@ -43,7 +43,7 @@ int obstack_vprintf(struct obstack *obst, const char *fmt, va_list ap)
} else {
break;
}
- buffer = malloc(size);
+ buffer = (char*)malloc(size);
}
obstack_grow(obst, buffer, len);
@@ -54,7 +54,7 @@ int obstack_vprintf(struct obstack *obst, const char *fmt, va_list ap)
}
#endif
-int obstack_printf(struct obstack *obst, const char *fmt, ...)
+int obstack_printf(struct obstack *obst, const char *fmt, ...) FIRM_NOTHROW
{
va_list ap;
int res;