Closed
Bug 136343
Opened 23 years ago
Closed 23 years ago
SGI CC compile: void* assignment compilation problems
Categories
(NSPR :: NSPR, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 136344
People
(Reporter: sjulier, Assigned: wtc)
Details
I have run into some (minor) problems with compiling yesterday's CVS tree (08th
April, 2002) on an SGI using CC version 7.3.1.3m under IRIX. Specifically, at
several points in the code, void* pointer values are assigned to non-void*
pointers which generates a compilation error under CC.
The compilation was configured using nsprpub/configure.
Here is a list of the errors:
==============================================================================
cc-1515 CC: ERROR File = prmem.c, Line = 170
A value of type "void *" cannot be assigned to an entity of type "PRBool *".
if ((sym = pr_FindSymbolInProg("nspr_use_zone_allocator")) != NULL) {
cc-1515 CC: ERROR File = prinit.c, Line = 565
A value of type "void *" cannot be assigned to an entity of type "char *".
attr->currentDirectory = PR_MALLOC(strlen(dir) + 1);
cc-1515 CC: ERROR File = prnetdb.c, Line = 429
A value of type "void *" cannot be assigned to an entity of type "char *".
tmpbuf = PR_Malloc(bufsize);
cc-1515 CC: ERROR File = prnetdb.c, Line = 561
A value of type "void *" cannot be assigned to an entity of type "char *".
tmpbuf = PR_Malloc(bufsize);
cc-1515 CC: ERROR File = prnetdb.c, Line = 740
A value of type "void *" cannot be assigned to an entity of type "char *".
tmpbuf = PR_Malloc(bufsize);
cc-1515 CC: ERROR File = prtpool.c, Line = 606
A value of type "void *" cannot be assigned to an entity of type
"PRThreadPool *".
tp = PR_CALLOC(sizeof(*tp));
cc-1515 CC: ERROR File = prtrace.c, Line = 174
A value of type "void *" cannot be assigned to an entity of type
"PRTraceEntry *".
tBuf = PR_Malloc( bufSize );
cc-1515 CC: ERROR File = prrwlock.c, Line = 418
A value of type "void *" cannot be assigned to an entity of type
"thread_rwlock_stack *".
if ((lock_stack = PR_GetThreadPrivate(pr_thread_rwlock_key)) == NULL) {
cc-1515 CC: ERROR File = prrwlock.c, Line = 461
A value of type "void *" cannot be assigned to an entity of type
"thread_rwlock_stack *".
if ((lock_stack = PR_GetThreadPrivate(pr_thread_rwlock_key)) == NULL)
cc-1515 CC: ERROR File = prrwlock.c, Line = 480
A value of type "void *" cannot be assigned to an entity of type
"thread_rwlock_stack *".
lock_stack = PR_GetThreadPrivate(pr_thread_rwlock_key);
cc-1552 CC: WARNING File = prrwlock.c, Line = 97
The variable "pr_thread_rwlock_alloc_failed" is set but never used.
static PRUintn pr_thread_rwlock_alloc_failed;
A value of type "void *" cannot be assigned to an entity of type "char *".
rp = (void *)a->avail;
cc-1515 CC: ERROR File = plarena.c, Line = 191
A value of type "void *" cannot be assigned to an entity of type "char *".
rp = (void *)a->avail;
cc-1515 CC: ERROR File = plarena.c, Line = 214
A value of type "void *" cannot be assigned to an entity of type "char *".
rp = (void *)a->avail;
==============================================================================
All of these can be fixed by adding the necessary casts (or, in the last three
cases, removing the void* cast).
Reporter | ||
Comment 1•23 years ago
|
||
This is an accidental repetition of bug 136344, with the platform set wrongly.
Please ignore / delete. Sorry!
Assignee | ||
Comment 2•23 years ago
|
||
*** This bug has been marked as a duplicate of 136344 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•