2.2.2 Compilation Warnings On Tru64 & NetBSD

Esh, Andrew AEsh at tricord.com
Thu Oct 25 10:53:04 GMT 2001


No apology necessary. This message is certainly appropriate for this list,
above all other lists.

I couldn't pay me to take that Digital compiler off your hands. It ignores
the ampersand in front of "pass[i].lm_pwd"? That's not just being
incompatible with the differences between certain flavors of C, it's being
incompatible with the C *language*. Something is seriously wrong with that
compiler. There are operator precedence rules which sometimes cause
compilers to get statements like this wrong. Those can be fixed with
parentheses. This problem is worse than that, though. It's not parsing C at
all.

This is really curious, considering your statement about being able to
compile Samba 2.0.7 with the same compiler. The combination of all these
statements yields an absurdity. You need to double check. Are you sure
someone didn't symlink /usr/bin/cc to /usr/games/fortune?

The two "follows non-static" warnings you get with the gcc compiler are
normal. We all see them. Not that this compiler has no problem with
ampersands, which is another indication of the relative quality of the other
one. Maybe you can get gcc working on Digital, and use that instead of cc.

-----Original Message-----
From: Boyce, Nick [mailto:nick.boyce at eds.com]
Sent: Thursday, October 25, 2001 12:09 PM
To: 'samba-technical at lists.samba.org'
Subject: 2.2.2 Compilation Warnings On Tru64 & NetBSD


Dear Samba Developers,

[My apologies for bothering this list if this is not appropriate]

I have just tried building Samba 2.2.2 *--with-winbind* on both Digital Unix
4.0D (= Tru64) and NetBSD 1.4.1, and got a *lot* of compilation warnings on
Digital Unix and two from NetBSD - this is using DEC's cc on Digital Unix
and gcc (egcs-2.91.60 19981201 / egcs-1.1.1 release) on NetBSD.  I don't
know quite how to report them to you - they're not exactly "bugs" I guess.

Samples from Digital Unix : 

  cc: Warning: libsmb/smbencrypt.c, line 248: In this statement, & before
array "(unicode_passwd)" is ignored.
          ZERO_STRUCT(unicode_passwd);
  --------^

  cc: Warning: rpc_server/srv_samr_nt.c, line 683: In this statement, &
before array "pass[i].lm_pwd" is ignored.
                  memset(&pass[i].lm_pwd, '\0', sizeof(pass[i].lm_pwd));
  -----------------------^

  cc: Warning: rpc_server/srv_spoolss_nt.c, line 3658: In this statement,
the referenced type of the pointer value "&nullstr" is "signed char", which
is not compatible with "array [256] of signed char".
          init_unistr_array(&info->previousdrivernames, &nullstr,
servername);
  --------^

  cc: Warning: lib/util.c, line 559: In this statement, the referenced type
of the pointer value "read" is "function () returning int", which is not
compatible with "function (int, pointer to void, unsigned long) returning
long".
          return (SMB_OFF_T)transfer_file_internal(infd, outfd, (size_t)n,
read, write);
  --------------------------^

  cc: Warning: tdb/tdb.c, line 106: In this statement, "(-1)" of type
"long", is being converted to "pointer to void".
                  if (tdb->map_ptr == MAP_FAILED) {
  --------------------^

Both warnings from NetBSD 1.4.1 :

  nsswitch/winbindd_pam.c:30: warning: static declaration for
`parse_domain_user' follows non-static

  nsswitch/winbindd_misc.c:35: warning: static declaration for
`trust_keystr' follows non-static

(I note the 2.2.2 release notice states that Winbind is only supported on
Linux currently, so I won't try to use it on *BSD yet, but I thought it was
worth seeing whether it would compile ...)


Are you folks interested in the (full) details, and if so, how/where would
you like me to submit the report ?

PS:  we're currently happy users of Samba 2.0.7 on Digital Unix, and got no
such compilation warnings with that version.

PPS: there's a *lot* of those '& before array "foo" is ignored' messages on
the Digital Unix build..

PPPS: oh yeah - could someone let me know if these hic-ups are serious ?
(I'll press on with testing in the meantime).

Cheers,

> Nick Boyce
> EDS, Bristol, UK
> 
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba-technical mailing list