# HG changeset patch # User Rob Landley # Date 1317342420 18000 # Node ID 707beb993e137b4d88a58f10a2502361fde721a5 # Parent 2ad7480aa7cafa68967e0cb17a53d7292e5361a9 Trivial cleanup. diff -r 2ad7480aa7ca -r 707beb993e13 sources/toys/ccwrap.c --- a/sources/toys/ccwrap.c Thu Sep 29 19:26:26 2011 -0500 +++ b/sources/toys/ccwrap.c Thu Sep 29 19:27:00 2011 -0500 @@ -32,10 +32,6 @@ // For C++ static char nostdinc_plus[] = "-nostdinc++"; -// gcc 4.3 generates tons of spurious warnings which you can't shut off. - -#define xasprintf(...) do {(void)asprintf(__VA_ARGS__);} while(0) - // Confirm that a regular file exists, and (optionally) has the executable bit. int is_file(char *filename, int has_exe) { @@ -150,8 +146,7 @@ // Add that directory to the start of $PATH. (Better safe than sorry.) *rindex(topdir,'/') = 0; - temp = malloc(5+strlen(topdir)+1+strlen(topdir)+14+strlen(path)+1); - sprintf(temp,"PATH=%s:%s/../tools/bin:%s",topdir,topdir,path); + asprintf(&temp,"PATH=%s:%s/../tools/bin:%s",topdir,topdir,path); putenv(temp); // The directory above the wrapper script should have include, cc,