# [PATCH] gitweb: fix two warnings

3 messages from 2006-07-26 to 2006-07-26. Participants: Johannes Schindelin, Luben Tuikov.
Thread: https://gitlist.dev/t/4993

## Johannes Schindelin, 2006-07-26 14:58

Subject: [PATCH] gitweb: fix two warnings
Message-ID: <Pine.LNX.4.63.0607261658130.29667@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0607261658130.29667%40wbgn013.biozentrum.uni-wuerzburg.de

```

These warnings cluttered up my log.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 gitweb/gitweb.cgi |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index e226ac2..e5fca63 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -795,7 +795,7 @@ sub git_read_projects {
 	if (-d $projects_list) {
 		# search in directory
 		my $dir = $projects_list;
-		opendir my $dh, $dir or return undef;
+		opendir my ($dh), $dir or return undef;
 		while (my $dir = readdir($dh)) {
 			if (-e "$projectroot/$dir/HEAD") {
 				my $pr = {
@@ -810,7 +810,7 @@ sub git_read_projects {
 		# 'git%2Fgit.git Linus+Torvalds'
 		# 'libs%2Fklibc%2Fklibc.git H.+Peter+Anvin'
 		# 'linux%2Fhotplug%2Fudev.git Greg+Kroah-Hartman'
-		open my $fd , $projects_list or return undef;
+		open my ($fd), $projects_list or return undef;
 		while (my $line = <$fd>) {
 			chomp $line;
 			my ($path, $owner) = split ' ', $line;
-- 
1.4.2.rc2.g6a4e

```

## Luben Tuikov, 2006-07-26 17:48

Subject: Re: [PATCH] gitweb: fix two warnings
Message-ID: <20060726174841.90834.qmail@web31809.mail.mud.yahoo.com>
URL: https://gitlist.dev/e/20060726174841.90834.qmail%40web31809.mail.mud.yahoo.com
In-Reply-To: <Pine.LNX.4.63.0607261658130.29667@wbgn013.biozentrum.uni-wuerzburg.de>

```
--- Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> 
> These warnings cluttered up my log.
> 
> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> ---
>  gitweb/gitweb.cgi |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
> index e226ac2..e5fca63 100755
> --- a/gitweb/gitweb.cgi
> +++ b/gitweb/gitweb.cgi
> @@ -795,7 +795,7 @@ sub git_read_projects {
>  	if (-d $projects_list) {
>  		# search in directory
>  		my $dir = $projects_list;
> -		opendir my $dh, $dir or return undef;
> +		opendir my ($dh), $dir or return undef;
>  		while (my $dir = readdir($dh)) {
>  			if (-e "$projectroot/$dir/HEAD") {
>  				my $pr = {
> @@ -810,7 +810,7 @@ sub git_read_projects {
>  		# 'git%2Fgit.git Linus+Torvalds'
>  		# 'libs%2Fklibc%2Fklibc.git H.+Peter+Anvin'
>  		# 'linux%2Fhotplug%2Fudev.git Greg+Kroah-Hartman'
> -		open my $fd , $projects_list or return undef;
> +		open my ($fd), $projects_list or return undef;
>  		while (my $line = <$fd>) {
>  			chomp $line;
>  			my ($path, $owner) = split ' ', $line;
> -- 
> 1.4.2.rc2.g6a4e

Can you please give more details of the warnings, cut-and-paste
would be nice, the problem as you perceive it, and your solution to it?

Thanks,
   Luben

```

## Johannes Schindelin, 2006-07-26 18:43

Subject: Re: [PATCH] gitweb: fix two warnings
Message-ID: <Pine.LNX.4.63.0607262040270.29667@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0607262040270.29667%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <20060726174841.90834.qmail@web31809.mail.mud.yahoo.com>

```
Hi,

On Wed, 26 Jul 2006, Luben Tuikov wrote:

> --- Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > 
> > These warnings cluttered up my log.
> 
> Can you please give more details of the warnings, cut-and-paste
> would be nice, the problem as you perceive it, and your solution to it?

Sure: The log contains these lines over and over again (I wrapped them 
manually):

Wed Jul 26 15:54:52 2006] [error] [client 192.168.0.67] \
[Wed Jul 26 15:54:52 2006] \
gitweb.cgi: Parentheses missing around "my" list at \
/[my-private-repo]/.git/gitweb/gitweb.cgi line 798., \
referer: http://dumbo:1234/?p=.git;a=summary

and

[Wed Jul 26 15:54:52 2006] [error] [client 192.168.0.67] \
[Wed Jul 26 15:54:52 2006] \
gitweb.cgi: Parentheses missing around "my" list at \
/[my-private-repo]/.git/gitweb/gitweb.cgi line 813., \
referer: http://dumbo:1234/?p=.git;a=summary

And my solution was to add the parentheses around the parameter of "my".

Ciao,
Dscho

```
