tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-frederic Clere <jfcl...@gmail.com>
Subject Re: Found two compiler warnings at MAC OS X at tcnative/apr
Date Sun, 09 Apr 2006 16:11:12 GMT
Peter Rossbach wrote:

> I got these two warnings:
>
>
> /bin/sh /Users/peter/tools/local//build-1/libtool --silent -- 
> mode=compile gcc -g -O2   -DHAVE_CONFIG_H -DDARWIN - 
> DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp   -g -O2 - 
> DHAVE_OPENSSL   -I/Users/peter/tomcat/develop/tomcat55/connectors/jni/ 
> native/include -I/System/Library/Frameworks/JavaVM.framework/Versions/ 
> 1.5/Home/include -I/System/Library/Frameworks/JavaVM.framework/ 
> Versions/1.5/Home/include/ -I/Users/peter/tools/local/include  -I/ 
> Users/peter/tools/local//include/apr-1   -o src/os.lo -c src/os.c &&  
> touch src/os.lo
> src/os.c: In function 'Java_org_apache_tomcat_jni_OS_threadCurrent':
> src/os.c:49: warning: cast from pointer to integer of different size
>
> /bin/sh /Users/peter/tools/local//build-1/libtool --silent -- 
> mode=compile gcc -g -O2   -DHAVE_CONFIG_H -DDARWIN - 
> DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp   -g -O2 - 
> DHAVE_OPENSSL   -I/Users/peter/tomcat/develop/tomcat55/connectors/jni/ 
> native/include -I/System/Library/Frameworks/JavaVM.framework/Versions/ 
> 1.5/Home/include -I/System/Library/Frameworks/JavaVM.framework/ 
> Versions/1.5/Home/include/ -I/Users/peter/tools/local/include  -I/ 
> Users/peter/tools/local//include/apr-1   -o src/ssl.lo -c src/ssl.c  
> && touch src/ssl.lo
> src/ssl.c: In function 'ssl_thread_id':
> src/ssl.c:203: warning: cast from pointer to integer of different size
>
>
> Source code
> os.c
> TCN_IMPLEMENT_CALL(jlong, OS, threadCurrent)(TCN_STDARGS)
> {
>     UNREFERENCED_STDARGS;
>     return (jlong)apr_os_thread_current();
> }
>
>
> ssl.c
> static unsigned long ssl_thread_id(void)
> ...
>     return (unsigned long)((jlong)apr_os_thread_current());
> ...
>
> Found at after a long typedef search  /usr/include/sys/_types.h
>
> struct _opaque_pthread_attr_t { long __sig; char __opaque 
> [__PTHREAD_ATTR_SIZE__]; };
>
> But I not clear what is the right cast or we need a spezial darwin  
> handling?

I don't think we need a special darwin handling: I think we can't cast a 
apr_os_thread_t to an unsigned long.

Cheers

Jean-Frederic

>
> Regards
> Peter
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message