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

6 messages from 2013-04-22 to 2013-04-22. Participants: Stefano Lattarini, Junio C Hamano, René Scharfe, Eric Sunshine.
Thread: https://gitlist.dev/t/33572

## Stefano Lattarini, 2013-04-22 16:18

Subject: [PATCH] zlib: fix compilation failures with Sun C Compilaer
Message-ID: <97eabaedd6cd7d876812474a35fa2d3d63dfec4a.1366647415.git.stefano.lattarini@gmail.com>
URL: https://gitlist.dev/e/97eabaedd6cd7d876812474a35fa2d3d63dfec4a.1366647415.git.stefano.lattarini%40gmail.com

```
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(-)

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, 2013-04-22 16:48

Subject: Re: [PATCH] zlib: fix compilation failures with Sun C Compilaer
Message-ID: <7vfvyipl4f.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vfvyipl4f.fsf%40alter.siamese.dyndns.org
In-Reply-To: <97eabaedd6cd7d876812474a35fa2d3d63dfec4a.1366647415.git.stefano.lattarini@gmail.com>

```
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.

>
> 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)

```

## René Scharfe, 2013-04-22 16:54

Subject: Re: [PATCH] zlib: fix compilation failures with Sun C Compilaer
Message-ID: <51756B47.80609@lsrfire.ath.cx>
URL: https://gitlist.dev/e/51756B47.80609%40lsrfire.ath.cx
In-Reply-To: <97eabaedd6cd7d876812474a35fa2d3d63dfec4a.1366647415.git.stefano.lattarini@gmail.com>

```
Am 22.04.2013 18:18, schrieb Stefano Lattarini:
> 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é

```

## Stefano Lattarini, 2013-04-22 17:50

Subject: Re: [PATCH] zlib: fix compilation failures with Sun C Compilaer
Message-ID: <5175784A.5060805@gmail.com>
URL: https://gitlist.dev/e/5175784A.5060805%40gmail.com
In-Reply-To: <7vfvyipl4f.fsf@alter.siamese.dyndns.org>

```
On 04/22/2013 06:48 PM, Junio C Hamano wrote:
> 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

```

## Eric Sunshine, 2013-04-22 21:41

Subject: Re: [PATCH] zlib: fix compilation failures with Sun C Compilaer
Message-ID: <CAPig+cQQiwumaswnKf1A-e5Rk4BHpRQqhqbL0p8zkmDnZ=Cbtg@mail.gmail.com>
URL: https://gitlist.dev/e/CAPig%2BcQQiwumaswnKf1A-e5Rk4BHpRQqhqbL0p8zkmDnZ%3DCbtg%40mail.gmail.com
In-Reply-To: <97eabaedd6cd7d876812474a35fa2d3d63dfec4a.1366647415.git.stefano.lattarini@gmail.com>

```
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/

> 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, 2013-04-22 22:06

Subject: Re: [PATCH] zlib: fix compilation failures with Sun C Compilaer
Message-ID: <5175B44F.4000303@gmail.com>
URL: https://gitlist.dev/e/5175B44F.4000303%40gmail.com
In-Reply-To: <CAPig+cQQiwumaswnKf1A-e5Rk4BHpRQqhqbL0p8zkmDnZ=Cbtg@mail.gmail.com>

```
On 04/22/2013 11:41 PM, Eric Sunshine wrote:
> 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

```
