diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-01-26 14:28:31 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2012-01-26 14:28:31 +0000 |
commit | 1712e1d4f7d73b741c8390e11c10d1e162650874 (patch) | |
tree | 856da708a9a3a0a3c978e3f3cf274abda12ba624 /libiberty/make-relative-prefix.c | |
parent | 4033a6bf64f5dcc6722100d8c09d08a51b490877 (diff) | |
download | gdb-1712e1d4f7d73b741c8390e11c10d1e162650874.zip gdb-1712e1d4f7d73b741c8390e11c10d1e162650874.tar.gz gdb-1712e1d4f7d73b741c8390e11c10d1e162650874.tar.bz2 |
* make-relative-prefix.c (make_relative_prefix_1): Avoid warning
about using preprocessor directives inside of macro arguments.
Diffstat (limited to 'libiberty/make-relative-prefix.c')
-rw-r--r-- | libiberty/make-relative-prefix.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libiberty/make-relative-prefix.c b/libiberty/make-relative-prefix.c index 7239e7b..fe639d1 100644 --- a/libiberty/make-relative-prefix.c +++ b/libiberty/make-relative-prefix.c @@ -248,14 +248,15 @@ make_relative_prefix_1 (const char *progname, const char *bin_prefix, { char *startp, *endp, *nstore; size_t prefixlen = strlen (temp) + 1; + size_t len; if (prefixlen < 2) prefixlen = 2; - nstore = (char *) alloca (prefixlen + strlen (progname) + 1 + len = prefixlen + strlen (progname) + 1; #ifdef HAVE_HOST_EXECUTABLE_SUFFIX - + strlen (HOST_EXECUTABLE_SUFFIX) + len += strlen (HOST_EXECUTABLE_SUFFIX); #endif - ); + nstore = (char *) alloca (len); startp = endp = temp; while (1) |