New submission from Vajrasky Kok:

Got this warning when compiling Python on Mac:

building '_scproxy' extension
gcc -Wno-unused-result -Wsign-compare -g -O0 -Wall -Wstrict-prototypes 
-Werror=declaration-after-statement -I./Include -I. -IInclude 
-I/usr/local/include -I/Users/sky/Code/python/cpython/Include 
-I/Users/sky/Code/python/cpython -c 
/Users/sky/Code/python/cpython/Modules/_scproxy.c -o 
build/temp.macosx-10.9-x86_64-3.6-pydebug/Users/sky/Code/python/cpython/Modules/_scproxy.o
/Users/sky/Code/python/cpython/Modules/_scproxy.c:74:10: warning: comparison of 
address of 'kSCPropNetProxiesExcludeSimpleHostnames' not equal to a null 
pointer is
      always true [-Wtautological-pointer-compare]
    if (&kSCPropNetProxiesExcludeSimpleHostnames != NULL) {
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    ~~~~
/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCSchemaDefinitions.h:3812:17:
 note: expanded from macro 'kSCPropNetProxiesExcludeSimpleHostnames'
          SC_SCHEMA_KV(kSCPropNetProxiesExcludeSimpleHostnames          \
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCSchemaDefinitions.h:469:31:
 note: expanded from macro 'SC_SCHEMA_KV'
  #define SC_SCHEMA_KV(k,v,t)   k
                                ^
1 warning generated.
gcc -bundle -undefined dynamic_lookup 
build/temp.macosx-10.9-x86_64-3.6-pydebug/Users/sky/Code/python/cpython/Modules/_scproxy.o
 -L/usr/local/lib -o 
build/lib.macosx-10.9-x86_64-3.6-pydebug/_scproxy.cpython-36dm-darwin.so 
-framework SystemConfiguration -framework CoreFoundation

I am not sure though whether the patch is correct solution. But anyway....

----------
components: Macintosh
files: fix_scproxy_compile_warning.patch
keywords: patch
messages: 244824
nosy: ned.deily, ronaldoussoren, vajrasky
priority: normal
severity: normal
status: open
title: Got warning when compiling _scproxy.c on Mac
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file39617/fix_scproxy_compile_warning.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24380>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to