threads / patch / 33572

patchzlib: fix compilation failures with Sun C Compilaer

Subject: [PATCH] zlib: fix compilation failures with Sun C Compilaer

## tl;dr

6 messages between Apr 22, 2013 and Apr 22, 2013. Diffs are folded; open one to read it.

replies: 5people: 4as markdown or json

Stefano Lattarini· Apr 22, 2013, 16:18 UTC · lore

Do this by removing a couple of useless return statements. Without this change, compilation with Sun C Compiler 5.9 (SunOS_i386 Patch 124868-15 2010/08/11) fails with the following message:

  "zlib.c", line 192: void function cannot return value
  "zlib.c", line 201: void function cannot return value
  cc: acomp failed for zlib.c
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 zlib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to zlib.c +2 −2
diff --git a/zlib.c b/zlib.c
index bbaa081..61e6df0 100644
--- a/zlib.c
+++ b/zlib.c
@@ -189,7 +189,7 @@ void git_deflate_init_gzip(git_zstream *strm, int level)
 	 * Use default 15 bits, +16 is to generate gzip header/trailer
 	 * instead of the zlib wrapper.
 	 */
-	return do_git_deflate_init(strm, level, 15 + 16);
+	do_git_deflate_init(strm, level, 15 + 16);
 }
 
 void git_deflate_init_raw(git_zstream *strm, int level)
@@ -198,7 +198,7 @@ void git_deflate_init_raw(git_zstream *strm, int level)
 	 * Use default 15 bits, negate the value to get raw compressed
 	 * data without zlib header and trailer.
 	 */
-	return do_git_deflate_init(strm, level, -15);
+	do_git_deflate_init(strm, level, -15);
 }
 
 int git_deflate_abort(git_zstream *strm)
-- 
1.8.1.rc3.897.gb3600c3
Junio C Hamano· Apr 22, 2013, 16:48 UTC · re: Stefano Lattarini · lore

Re: [PATCH] zlib: fix compilation failures with Sun C Compilaer

Stefano Lattarini <stefano.lattarini@gmail.com> writes:
Show 7 quoted lines
> Do this by removing a couple of useless return statements.  Without this
> change, compilation with Sun C Compiler 5.9 (SunOS_i386 Patch 124868-15
> 2010/08/11) fails with the following message:
>
>   "zlib.c", line 192: void function cannot return value
>   "zlib.c", line 201: void function cannot return value
>   cc: acomp failed for zlib.c

Thanks for catching a recent regression in the mainline before any tagged release is made out of it. Very much appreciated.

Show 28 quoted lines
>
> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
> ---
>  zlib.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/zlib.c b/zlib.c
> index bbaa081..61e6df0 100644
> --- a/zlib.c
> +++ b/zlib.c
> @@ -189,7 +189,7 @@ void git_deflate_init_gzip(git_zstream *strm, int level)
>  	 * Use default 15 bits, +16 is to generate gzip header/trailer
>  	 * instead of the zlib wrapper.
>  	 */
> -	return do_git_deflate_init(strm, level, 15 + 16);
> +	do_git_deflate_init(strm, level, 15 + 16);
>  }
>  
>  void git_deflate_init_raw(git_zstream *strm, int level)
> @@ -198,7 +198,7 @@ void git_deflate_init_raw(git_zstream *strm, int level)
>  	 * Use default 15 bits, negate the value to get raw compressed
>  	 * data without zlib header and trailer.
>  	 */
> -	return do_git_deflate_init(strm, level, -15);
> +	do_git_deflate_init(strm, level, -15);
>  }
>  
>  int git_deflate_abort(git_zstream *strm)
Stefano Lattarini· Apr 22, 2013, 17:50 UTC · re: Junio C Hamano · lore

Re: [PATCH] zlib: fix compilation failures with Sun C Compilaer

On 04/22/2013 06:48 PM, Junio C Hamano wrote:
Show 13 quoted lines
> Stefano Lattarini <stefano.lattarini@gmail.com> writes:
> 
>> Do this by removing a couple of useless return statements.  Without this
>> change, compilation with Sun C Compiler 5.9 (SunOS_i386 Patch 124868-15
>> 2010/08/11) fails with the following message:
>>
>>   "zlib.c", line 192: void function cannot return value
>>   "zlib.c", line 201: void function cannot return value
>>   cc: acomp failed for zlib.c
> 
> Thanks for catching a recent regression in the mainline before any
> tagged release is made out of it.  Very much appreciated.
>

Actually, I tried to build the bleeding-edge git on Solaris to use it myself, rather than to test it ;-) So, thanks to you and all the git contributors for continuously improving the package, thus making it worth to try to build and use the bleeding-edge version.

Best regards,
  Stefano
René Scharfe· Apr 22, 2013, 16:54 UTC · re: Stefano Lattarini · lore

Re: [PATCH] zlib: fix compilation failures with Sun C Compilaer

Am 22.04.2013 18:18, schrieb Stefano Lattarini:
Show 7 quoted lines
> Do this by removing a couple of useless return statements.  Without this
> change, compilation with Sun C Compiler 5.9 (SunOS_i386 Patch 124868-15
> 2010/08/11) fails with the following message:
>
>    "zlib.c", line 192: void function cannot return value
>    "zlib.c", line 201: void function cannot return value
>    cc: acomp failed for zlib.c

Hmm, what was I thinking when I introduced these returns in c3c2e1a0? :-/ Thanks for catching!

René
Eric Sunshine· Apr 22, 2013, 21:41 UTC · re: Stefano Lattarini · lore

Re: [PATCH] zlib: fix compilation failures with Sun C Compilaer

On Mon, Apr 22, 2013 at 12:18 PM, Stefano Lattarini <stefano.lattarini@gmail.com> wrote:

> zlib: fix compilation failures with Sun C Compilaer
s/Compilaer/compiler/
Show 9 quoted lines
> Do this by removing a couple of useless return statements.  Without this
> change, compilation with Sun C Compiler 5.9 (SunOS_i386 Patch 124868-15
> 2010/08/11) fails with the following message:
>
>   "zlib.c", line 192: void function cannot return value
>   "zlib.c", line 201: void function cannot return value
>   cc: acomp failed for zlib.c
>
> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini· Apr 22, 2013, 22:06 UTC · re: Eric Sunshine · lore

Re: [PATCH] zlib: fix compilation failures with Sun C Compilaer

On 04/22/2013 11:41 PM, Eric Sunshine wrote:
Show 6 quoted lines
> On Mon, Apr 22, 2013 at 12:18 PM, Stefano Lattarini
> <stefano.lattarini@gmail.com> wrote:
>> zlib: fix compilation failures with Sun C Compilaer
> 
> s/Compilaer/compiler/
> 
Oops, well spotted.  Junio, can you fix this locally?
Thanks, and sorry for the stupid typo,
  Stefano

← back to recent threads