some messages from a contemporary HP-UX 11.23 compiler

Rick Jones rick.jones2 at hp.com
Tue Nov 15 01:44:53 UTC 2005


> 
> If I get a chance, I'll try removing those +W's on the IPF compile and see if 
> the compiler is still overly chatty and/or the include files are snafu

when I removed the +W and the +w1, things got very quited indeed on the IPF 
compile, with this as the only warning:

           cc -Ae -z  -I/tmp/bind-9.3.2b2 -I./include  -I./../pthreads/include  -
I../include  -I./../include  -I./..   -D_REENTRANT  -D_XOPEN_SOURCE_EXTENDED -g
     -c time.c
"time.c", line 370: warning #2068-D: integer conversion resulted in a change of
sign
             (i = (time_t)-1) != 4294967295u &&                 /* Is signed. */
                  ^



if I keep the +w1 and get rid of the +W <list>, the warnings look pretty much as 
before. At least while watching them stream by, not an overly scientific comparison.

Being a little more scientific about it, looking for lines with "remark" in them 
  shows:

# grep remark make.log | wc -l
2085
# grep remark make.log2 | wc -l
0
# grep remark make.log3 | wc -l
2401

where make.log was the initial configure, make.log2 was with +w and +W gone, and 
make.log3 was with just +W gone.

Looking to see just what sorts of remarks there are with a slightly simplistic 
filter:

# grep remark make.log3 | awk -F ":" '{print $3}' | sort | uniq
  64 bit migration
  argument is incompatible with corresponding format string conversion
  conversion between enum type and pointer type
  conversion from "caddr_t" to a more strictly aligned type "struct cmsghdr *" 
may cause misaligned access
  conversion from "char *" to a more strictly aligned type "struct cmsghdr *" 
may cause misaligned access
  conversion from "char *" to a more strictly aligned type "struct if_laddrreq 
*" may cause misaligned access
  conversion from "char *" to a more strictly aligned type "struct ifreq *" may 
cause misaligned access
  conversion from "char *" to a more strictly aligned type "struct in6_addr *" 
may cause misaligned access
  conversion from "char *" to a more strictly aligned type "struct in_addr *" 
may cause misaligned access
  conversion from "const struct sockaddr *" to a more strictly aligned type 
"const struct sockaddr_in *" may cause misaligned access
  conversion from "const struct sockaddr *" to a more strictly aligned type 
"const struct sockaddr_in6 *" may cause misaligned access
  conversion from "dns_db_t *" to a more strictly aligned type "dns_rbtdb64_t *" 
may cause misaligned access
  conversion from "int" to "char" may lose significant bits
  conversion from "int" to "dns_keytag_t" may lose significant bits
  conversion from "int" to "dns_messageid_t" may lose significant bits
  conversion from "int" to "dns_rdatatype_t" may lose significant bits
  conversion from "int" to "in_port_t" may lose significant bits
  conversion from "int" to "isc_uint16_t" may lose significant bits
  conversion from "int" to "isc_uint8_t" may lose significant bits
  conversion from "int" to "lwres_uint16_t" may lose significant bits
  conversion from "int" to "sa_family_t" may lose significant bits
  conversion from "int" to "uint8_t" may lose significant bits
  conversion from "int" to "unsigned char" may lose significant bits
  conversion from "int" to "unsigned long long" may lose sign
  conversion from "int" to "unsigned short" may lose significant bits
  conversion from "isc_uint8_t *" to a more strictly aligned type "isc_uint32_t 
*" may cause misaligned access
  conversion from "long" to "short" may lose significant bits
  conversion from "long" to "unsigned char" may lose significant bits
  conversion from "long" to "unsigned long long" may lose sign
  conversion from "size_t" to "lwres_uint16_t" may lose significant bits
  conversion from "ssize_t" to "unsigned char" may lose significant bits
  conversion from "struct sockaddr *" to a more strictly aligned type "struct 
sockaddr_in *" may cause misaligned access
  conversion from "struct sockaddr *" to a more strictly aligned type "struct 
sockaddr_in6 *" may cause misaligned access
  conversion from "struct sockaddr_ext *" to a more strictly aligned type 
"struct sockaddr_in *" may cause misaligned access
  conversion from "struct sockaddr_ext *" to a more strictly aligned type 
"struct sockaddr_in6 *" may cause misaligned access
  conversion from "unsigned char *" to a more strictly aligned type 
"rdatasetheader64_t *" may cause misaligned access
  conversion from "unsigned char *" to a more strictly aligned type 
"rdatasetheader_t *" may cause misaligned access
  conversion from "unsigned char *" to a more strictly aligned type "struct 
in6_pktinfo *" may cause misaligned access
  conversion from "unsigned int" to "dns_cert_t" may lose significant bits
  conversion from "unsigned int" to "dns_keyflags_t" may lose significant bits
  conversion from "unsigned int" to "dns_messageid_t" may lose significant bits
  conversion from "unsigned int" to "dns_rcode_t" may lose significant bits
  conversion from "unsigned int" to "dns_rdatatype_t" may lose significant bits
  conversion from "unsigned int" to "dns_secalg_t" may lose significant bits
  conversion from "unsigned int" to "dns_secproto_t" may lose significant bits
  conversion from "unsigned int" to "isc_uint16_t" may lose significant bits
  conversion from "unsigned int" to "isc_uint8_t" may lose significant bits
  conversion from "unsigned int" to "lwres_uint16_t" may lose significant bits
  conversion from "unsigned int" to "lwres_uint8_t" may lose significant bits
  conversion from "unsigned int" to "sa_family_t" may lose significant bits
  conversion from "unsigned int" to "unsigned char" may lose significant bits
  conversion from "unsigned int" to "unsigned short" may lose significant bits
  conversion from "unsigned long" to "unsigned char" may lose significant bits
  declaration hides function "overmem" (declared at line 1198)
  declaration hides function "overmem" (declared at line 3446)
  declaration hides function "sigset" (declared at line 296 of 
"/usr/include/sys/signal.h")
  declaration hides function "socket" (declared at line 469 of 
"/usr/include/sys/socket.h")
  declaration hides function "time" (declared at line 248 of 
"/usr/include/sys/time.h")
  declaration hides function "write" (declared at line 186 of 
"/usr/include/sys/unistd.h")
  declaration hides parameter "headers" (declared at line 386)
  declaration hides parameter "obj" (declared at line 1369)
  declaration hides variable "addrs" (declared at line 324)
  declaration hides variable "b" (declared at line 339)
  declaration hides variable "buf" (declared at line 130)
  declaration hides variable "element" (declared at line 2135)
  declaration hides variable "element" (declared at line 359)
  declaration hides variable "element" (declared at line 734)
  declaration hides variable "ev" (declared at line 135)
  declaration hides variable "fp" (declared at line 104)
  declaration hides variable "he" (declared at line 34)
  declaration hides variable "id" (declared at line 236 of "./include/dig/dig.h")
  declaration hides variable "keyfile" (declared at line 58)
  declaration hides variable "mctx" (declared at line 75)
  declaration hides variable "n" (declared at line 2529)
  declaration hides variable "port" (declared at line 106)
  declaration hides variable "rdata" (declared at line 289)
  declaration hides variable "result" (declared at line 58)
  declaration hides variable "str" (declared at line 748)
  declaration hides variable "symtab" (declared at line 360)
  declaration hides variable "t" (declared at line 221)
  declaration hides variable "text" (declared at line 41)
  declaration hides variable "tresult" (declared at line 1100)
  declaration hides variable "tresult" (declared at line 1225)
  declaration hides variable "tresult" (declared at line 234)
  declaration hides variable "verbose" (declared at line 44)
  enumerated type mixed with another type
  padding size of struct "cc" to alignment boundary
  padding size of struct "dns_fixedname" to alignment boundary
  padding size of struct "dns_rdata_any_tsig" to alignment boundary
  padding size of struct "dns_rdata_gpos" to alignment boundary
  padding size of struct "dns_rdata_hinfo" to alignment boundary
  padding size of struct "dns_rdata_in_nsap" to alignment boundary
  padding size of struct "dns_rdata_in_wks" to alignment boundary
  padding size of struct "dns_rdata_isdn" to alignment boundary
  padding size of struct "dns_rdata_nsec" to alignment boundary
  padding size of struct "dns_rdata_nxt" to alignment boundary
  padding size of struct "dns_rdata_unspec_t" to alignment boundary
  padding size of struct "dns_rdata_x25" to alignment boundary
  padding size of struct "rbtdb_version" to alignment boundary
  padding size of struct "rdatasetheader" to alignment boundary
  padding size of struct "tt" to alignment boundary
  padding size of struct <unknown> to alignment boundary
  padding struct to align "acl"
  padding struct to align "aclenv"
  padding struct to align "algorithms"
  padding struct to align "aliases"
  padding struct to align "aliaslen"
  padding struct to align "bucket"
  padding struct to align "buffer"
  padding struct to align "checkid"
  padding struct to align "counts"
  padding struct to align "data"
  padding struct to align "db"
  padding struct to align "digest"
  padding struct to align "dispentry"
  padding struct to align "domainname"
  padding struct to align "elements"
  padding struct to align "exchange"
  padding struct to align "fixed_top"
  padding struct to align "flags"
  padding struct to align "flush"
  padding struct to align "host"
  padding struct to align "in6_addr"
  padding struct to align "ixfr_serial"
  padding struct to align "key"
  padding struct to align "length"
  padding struct to align "link"
  padding struct to align "lock"
  padding struct to align "lwservers"
  padding struct to align "map"
  padding struct to align "map822"
  padding struct to align "mctx"
  padding struct to align "mx"
  padding struct to align "name"
  padding struct to align "name_bucket"
  padding struct to align "next"
  padding struct to align "opcode"
  padding struct to align "opt_reserved"
  padding struct to align "options"
  padding struct to align "other"
  padding struct to align "query"
  padding struct to align "rdatas"
  padding struct to align "rdataset"
  padding struct to align "rdtypeset"
  padding struct to align "realname"
  padding struct to align "recvcmsgbuf"
  padding struct to align "regexp"
  padding struct to align "replacement"
  padding struct to align "rwlock"
  padding struct to align "server"
  padding struct to align "service"
  padding struct to align "shutdown_why"
  padding struct to align "signature"
  padding struct to align "signer"
  padding struct to align "socketmgr"
  padding struct to align "sorted"
  padding struct to align "sortlist"
  padding struct to align "target"
  padding struct to align "timesigned"
  padding struct to align "ttl"
  padding struct to align "type"
  padding struct to align "value"
  zero used for undefined preprocessing identifier


Comparing those messages between the original and the withoutW case suggests 
only one new "flavor" of warning from removing the +W:

# grep remark make.log | awk -F ":" '{print $3}' | sort | uniq > orig
# grep remark make.log3 | awk -F ":" '{print $3}' | sort | uniq > withoutW
# diff orig withoutW
162a163
 >  zero used for undefined preprocessing identifier

Which I believe was for ISC_MUTEX_DEBUG:

           cc -Ae -z  -I/tmp/bind-9.3.2b2 -I./include  -I./../pthreads/include  -
I../include  -I./../include  -I./..   -D_REENTRANT  -D_XOPEN_SOURCE_EXTENDED -g
   +w1  -c app.c
"./../pthreads/include/isc/mutex.h", line 33: remark #2193-D: zero used for unde
fined preprocessing identifier
   #if ISC_MUTEX_DEBUG && defined(__NetBSD__) && defined(PTHREAD_MUTEX_ERRORCHECK
)
       ^

"./../pthreads/include/isc/mutex.h", line 68: remark #2193-D: zero used for unde
fined preprocessing identifier
   #if ISC_MUTEX_DEBUG && defined(PTHREAD_MUTEX_ERRORCHECK)
       ^

since that is in a .h file it shows-up rather often, accounting I suspect for 
most of the remark count delta:

# grep zero make.log3 | wc -l
316

sincerely,

rick jones



More information about the bind-workers mailing list