From: Andreas Hansson Date: Wed, 30 May 2012 09:31:48 +0000 (-0400) Subject: gcc: Small fixes to compile with gcc 4.7 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d520cda808704c98dea14f2cfd563b43f73c8d6;p=gem5.git gcc: Small fixes to compile with gcc 4.7 This patch makes two very minor changes to please gcc 4.7. The CopyData function no longer exists and this has been replaced. For some reason previous versions of gcc did not complain on the const char casting not having an implementation, but this is now addressed. --- diff --git a/src/kern/linux/printk.cc b/src/kern/linux/printk.cc index a19d81b08..e856e2263 100644 --- a/src/kern/linux/printk.cc +++ b/src/kern/linux/printk.cc @@ -169,7 +169,7 @@ Printk(stringstream &out, Arguments args) break; case 's': { - const char *s = (const char *)args; + const char *s = (char *)args; if (!s) s = ""; diff --git a/src/sim/arguments.hh b/src/sim/arguments.hh index 5c7941562..f28f6635a 100644 --- a/src/sim/arguments.hh +++ b/src/sim/arguments.hh @@ -137,7 +137,7 @@ class Arguments template operator T *() { T *buf = (T *)data->alloc(sizeof(T)); - CopyData(tc, buf, getArg(sizeof(T)), sizeof(T)); + CopyOut(tc, buf, getArg(sizeof(T)), sizeof(T)); return buf; }