Closed Bug 367761 Opened 18 years ago Closed 18 years ago

compile error ssl3con.c Line = 6441

Categories

(NSS :: Build, defect)

SGI
IRIX
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 338798

People

(Reporter: Rich.Fleck, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; IRIX64 IP35; en-US; rv:1.8.0.4) Gecko/20060614 SeaMonkey/1.0.2
Build Identifier: SeaMonkey 1.1

MIPSpro Compilers: Version 7.4.4m
 is not happy with the declaration of SECItem pmsbuf
using     unsigned char     rsaPmsBuf[SSL3_RSA_PMS_LENGTH];

cc-1028 cc: ERROR File = ssl3con.c, Line = 6441
  The expression used must have a constant value.

      SECItem           pmsItem = {siBuffer, rsaPmsBuf, sizeof rsaPmsBuf};

SECItem is an enum 0-12
so beside the compiler not liking the use of rsaPmsBuf wouldn't there
be a problem with the sizeof rsaPmsbuf which is 48 in the enum?

gcc does not complain about this declaration


Reproducible: Always

Steps to Reproduce:
1.
2.
3.
cc -o /usr/apps/seamonkey-1.1/mozilla/sgiobj/nss/ssl/ssl3con.o -c -O -OPT:Olimit=4000 -dollar -fullwarn -xansi -woff 1209 -n32 -mips3 -exceptions -DSVR4 -DIRIX  -multigot -D_SGI_MP_SOURCE -DIRIX6_5 -mips3 -DXP_UNIX -DNSS_ENABLE_ECC -UDEBUG -DNDEBUG -DNSS_ENABLE_ECC -I/usr/apps/seamonkey-1.1/mozilla/sgiobj/dist/include/nspr -I/usr/apps/seamonkey-1.1/mozilla/sgiobj/dist/include  -I/usr/apps/seamonkey-1.1/mozilla/sgiobj/dist/public/nss -I/usr/apps/seamonkey-1.1/mozilla/sgiobj/dist/private/nss -I/usr/apps/seamonkey-1.1/mozilla/sgiobj/dist/include -I/usr/apps/seamonkey-1.1/mozilla/sgiobj/dist/include/dbm  ssl3con.c
Actual Results:  
cc -o /usr/apps/seamonkey-1.1/mozilla/sgiobj/nss/ssl/ssl3con.o -c -O -OPT:Olimit=4000 -dollar -fullwarn -xansi -woff 1209 -n32 -mips3 -exceptions -DSVR4 -DIRIX  -multigot -D_SGI_MP_SOURCE -DIRIX6_5 -mips3 -DXP_UNIX -DNSS_ENABLE_ECC -UDEBUG -DNDEBUG -DNSS_ENABLE_ECC -I/usr/apps/seamonkey-1.1/mozilla/sgiobj/dist/include/nspr -I/usr/apps/seamonkey-1.1/mozilla/sgiobj/dist/include  -I/usr/apps/seamonkey-1.1/mozilla/sgiobj/dist/public/nss -I/usr/apps/seamonkey-1.1/mozilla/sgiobj/dist/private/nss -I/usr/apps/seamonkey-1.1/mozilla/sgiobj/dist/include -I/usr/apps/seamonkey-1.1/mozilla/sgiobj/dist/include/dbm  ssl3con.c
cc-3201 cc: REMARK File = ssl3con.c, Line = 717
  The parameter "ctx" was never referenced.

  Null_Cipher(void *ctx, unsigned char *output, int *outputLen, int maxOutputLen,
                    ^

cc-3201 cc: REMARK File = ssl3con.c, Line = 717
  The parameter "maxOutputLen" was never referenced.

  Null_Cipher(void *ctx, unsigned char *output, int *outputLen, int maxOutputLen,
                                                                    ^

cc-1552 cc: WARNING File = ssl3con.c, Line = 1218
  The variable "macLength" is set but never used.

        CK_ULONG           macLength;
                           ^

cc-1185 cc: WARNING File = ssl3con.c, Line = 1392
  An enumerated type is mixed with another type.

      mac_param.type = 0;
                     ^

cc-1185 cc: WARNING File = ssl3con.c, Line = 2137
  An enumerated type is mixed with another type.

  	return rv;
  	       ^

cc-1185 cc: WARNING File = ssl3con.c, Line = 2165
  An enumerated type is mixed with another type.

      return rv;
             ^

cc-1552 cc: WARNING File = ssl3con.c, Line = 2278
  The variable "isTLS" is set but never used.

      PRBool isTLS;
             ^

cc-3201 cc: REMARK File = ssl3con.c, Line = 3710
  The parameter "pwArg" was never referenced.

  	void *                    pwArg)
  	                          ^

cc-1182 cc: REMARK File = ssl3con.c, Line = 3946
  Dynamic initialization is in code that is not reachable.

      SECKEYPublicKey   *pubWrapKey = NULL;
                         ^

cc-1548 cc: WARNING File = ssl3con.c, Line = 3943
  The transfer of control bypasses...

            ... the initialization of variable "pubWrapKey" (declared at line
                      3946).
            ... the initialization of variable "privWrapKey" (declared at line
                      3947).
      switch (exchKeyType) {
      ^

cc-1028 cc: ERROR File = ssl3con.c, Line = 6441
  The expression used must have a constant value.

      SECItem           pmsItem = {siBuffer, rsaPmsBuf, sizeof rsaPmsBuf};
                                             ^

cc-1552 cc: WARNING File = ssl3con.c, Line = 6869
  The variable "trusted" is set but never used.

      PRBool           trusted 	= PR_FALSE;
                       ^

cc-1174 cc: REMARK File = /usr/apps/seamonkey-1.1/mozilla/sgiobj/dist/public/nss/keythi.h, Line = 211
  The variable "SECKEY_CKA_PRIVATE" was declared but never referenced.

  CachedAttribute(CKA_PRIVATE,1) /* bit 1 is the value of CKA_PRIVATE */
  ^

1 error detected in the compilation of "ssl3con.c".
gmake[4]: *** [/usr/apps/seamonkey-1.1/mozilla/sgiobj/nss/ssl/ssl3con.o] Error 2
gmake[4]: Leaving directory `/usr/apps/seamonkey-1.1/mozilla/security/nss/lib/ssl'
gmake[3]: *** [libs] Error 2
gmake[3]: Leaving directory `/usr/apps/seamonkey-1.1/mozilla/security/nss/lib'
gmake[2]: *** [libs] Error 2
gmake[2]: Leaving directory `/usr/apps/seamonkey-1.1/mozilla/sgiobj/security/manager'
gmake[1]: *** [tier_50] Error 2
gmake[1]: Leaving directory `/usr/apps/seamonkey-1.1/mozilla/sgiobj'
gmake: *** [default] Error 2
> 


../configure  --prefix=/usr/local/seamonkey1 --enable-crypto --disable-tests '--enable-optimize=-mips4\ -O3' --enable-nspr-autoconf --disable-debug --disable-gnomevfs --disable-activex --disable-activex-scripting --disable-profilesharing --disable-freetype2 --enable-extensions=spellcheck,default --enable-application=suite --enable-default-toolkit=gtk --with-pthreads
Assignee: nobody → nobody
Component: Build Config → Build
Product: Mozilla Application Suite → NSS
QA Contact: build-config → build
This was fixed in NSS 3.11.2 last June.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Ok

If anyone trying to use the MipsPro compiler on IRIX to compile seamonkey
stumbles on this problem in future the solution covered by bug 338798 is to
use the c99 version of cc for this file.
This should be accomplished by either setting the environment variable CC to c99
setenv CC c99
or adding -c99 to the CFLAGS environment variable prior to running configure
but those values are not being passed to the compilation of ssl3con.

The work around is to compile the file by hand using c99 and restarting the make

Note using c99 for the entire compile might  cause a problem with va_copy else where in the compile.
A workaround to that is to change 
ac_cv_va_copy=yes
to
ac_cv_va_copy=no
in configure
You need to log in before you can comment on or make changes to this bug.