httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject RE: warnings on sol 2.6
Date Sun, 30 Sep 2001 07:45:46 GMT
> From: Justin Erenkrantz [mailto:jerenkrantz@ebuilt.com]
> Sent: 30 September 2001 06:30
>> On Sun, Sep 30, 2001 at 12:24:08AM -0400, Cliff Woolley wrote:
>> 
>> A few warnings that have shown up on Solaris 2.6 sometime 
>> within the last few weeks:
>> 
>> thread.c: In function `apr_thread_once_init':
>> thread.c:261: warning: missing braces around initializer
>> thread.c:261: warning: (near initialization for
>> `once_init.__pthread_once_pad')
> 
> I've seen this on Solaris 8 as well.  I was tempted to commit the {}s,
> and I know that it compiles fine on Linux 2.4 with the {}.  Anyone 
> else care to comment?
> 
> Linux defines PTHREAD_ONCE as 0, but Solaris defines it as a
> structure and hence wants the {}.  Is there a side effect if we
> place too many {}s?  I forget if they are fluff or not.

That should work.  Doing this:

int i = { 0 };

works just fine, because the initializer list matches the 'number
of fields and the depth'* to initialize.  In this case, it should
be ok.  Note that it isn't simply fluff, this will give you a warning:

int i = {{ 0 }};

*) This isn't a quote, this is me trying to find words to describe
   it.

>> thread_rwlock.c:224: warning: no previous prototype for
>> `apr_thread_rwlock_lock'
>> 
>> This should be easy to fix.

The proto simply isn't in the header file, but I can't tell if
this is intentional and apr_thread_rwlock_lock was just a copy
'n paste too many in the c file, or that it should actually be
in the header.  Aaron?

> I haven't seen this, but I may have missed it.
> 
>> proxy_ftp.c: In function `ap_proxy_ftp_handler':
>> proxy_ftp.c:800: warning: subscript has type `char'
>> 
>> I looked at this... I must be missing something, but I swear I don't see
>> what the problem is.  Anyone?


550:    char buffer[MAX_STRING_LEN];
555:    int i = 0, j, len, rc;

800:        for (i = 0; buffer[i] && !isdigit(buffer[i]); i++);

Hmmm, this is very weird...

> I'm actually compiling proxy for the first time.  If I see anything,
> I'll comment.  -- justin

Sander

Mime
View raw message