Subject: bogus CC warning?
To: None <current-users@netbsd.org>
From: Aidan Cully <aidan@kublai.com>
List: current-users
Date: 04/04/1999 15:53:26
Hey all..  This is necessarily sketchy, since it deals with export-
restricted software, and I can't duplicate these results in an
exportable way.

While trying to do some cleanup for the krb5 integration (now that
1.4 has branched, I'm almost ready to move ahead with committing
some of this stuff to domestic/), I've noticed the following
compilation errors that appeared last time I supped:
cc1: warnings being treated as errors
/usr/local/build/src/domestic/lib/libcrypto/../../krb5/lib/crypto/des/d3_ecb.c: In function `mit_des3_ecb_encrypt':
/usr/local/build/src/domestic/lib/libcrypto/../../krb5/lib/crypto/des/d3_ecb.c:40: warning: passing arg 1 of `mit_des_ecb_encrypt' from incompatible pointer type
/usr/local/build/src/domestic/lib/libcrypto/../../krb5/lib/crypto/des/d3_ecb.c:41: warning: passing arg 1 of `mit_des_ecb_encrypt' from incompatible pointer type
/usr/local/build/src/domestic/lib/libcrypto/../../krb5/lib/crypto/des/d3_ecb.c:44: warning: passing arg 1 of `mit_des_ecb_encrypt' from incompatible pointer type
/usr/local/build/src/domestic/lib/libcrypto/../../krb5/lib/crypto/des/d3_ecb.c:45: warning: passing arg 1 of `mit_des_ecb_encrypt' from incompatible pointer type
*** Error code 1

Now, the code in question looks (ahem) kind of like this:

typedef char arr[8];
void some_function(const arr in, arr out);

some_other_function(const arr in, arr out) {
    some_function(in, out);
    some_function(out, out);
    some_function(out, out);
}
where the first 'some_function' invocation doesn't cause any
errors, but the next two do.  As you can see, the only difference
between the types of 'in' and 'out' is that 'in' is const and 'out'
isn't.  (The "arg 1" above is declared "type *", while the function
looks to take "const type *").  Now, the, aheh, "funny" thing here
is that I can't reproduce the problem with code that looks almost
exactly like the fake code I put above, so you probably won't be
able to duplicate this yourself.  This all worked before I did a
make build from Mar. 28th sources..  The old snapshot I was using
was from sometime in November (I may be able to find an exact date
if it's interesting).  Has anything exciting happened to egcs since
3/28?  Should I try upgrading my system again?  If any US
developers would like to see the source tree, I'd be willing to
accomodate..

Thanks,
--aidan