Patch: ISO C90 conversion fixes

Andreas Jaeger aj@suse.de
Mon Sep 15 14:37:00 GMT 2003


Anthony Green <green@redhat.com> writes:

> Here are some build-fixing corrections.  Ok to commit?

Why didn't I noticed that when testing myself? ;-(

Please add them - I don't have approval right but since I broke this,
I would consider adding it directly ;-).  The patch is obviously
correct.

Thanks,
Andreas

>
> 2003-09-15  Anthony Green  <green@redhat.com>
>
> 	* dlltool.c (prefix_encode): Fix ISO C90 conversion.
> 	(dlltmp): Ditto.
> 	(dtab): Ditto.
>
>
> Index: dlltool.c
> ===================================================================
> RCS file: /cvs/src/src/binutils/dlltool.c,v
> retrieving revision 1.43
> diff -c -u -r1.43 dlltool.c
> --- dlltool.c	14 Sep 2003 12:20:16 -0000	1.43
> +++ dlltool.c	15 Sep 2003 14:24:23 -0000
> @@ -706,12 +706,12 @@
>  static void inform (const char *, ...);
>  
>  static char *
> -prefix_encode (char *start, unsigned code))
> +prefix_encode (char *start, unsigned code)
>  {
>    static char alpha[26] = "abcdefghijklmnopqrstuvwxyz";
>    static char buf[32];
>    char *p;
> -  strcpy (buf, start;
> +  strcpy (buf, start);
>    p = strchr (buf, '\0');
>    do
>      *p++ = alpha[code % sizeof (alpha)];
> @@ -721,11 +721,11 @@
>  }
>  
>  static char *
> -dlltmp (char **buf, const char *fmt))
> +dlltmp (char **buf, const char *fmt)
>  {
>    if (!*buf)
>      {
> -      *buf = malloc (strlen (tmp_prefix) + 64;
> +      *buf = malloc (strlen (tmp_prefix) + 64);
>        sprintf (*buf, fmt, tmp_prefix);
>      }
>    return *buf;
> @@ -2890,7 +2890,7 @@
>  }
>  
>  static void
> -dtab (export **ptr
> +dtab (export_type **ptr
>  #ifndef SACDEBUG
>  ATTRIBUTE_UNUSED
>  #endif

Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20030915/5abd7041/attachment.sig>


More information about the Binutils mailing list