summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>1999-09-20 23:59:09 +0000
committerwtc%netscape.com <devnull@localhost>1999-09-20 23:59:09 +0000
commit036d7c9045dcf6d14d0dc31e9978ccc9b5c417f5 (patch)
treedb2ad31cc2a453bd0c40ac623a1cf0d60118712c
parentb23a92e63d76d4e5ee58a9ec5ad89aa75a6b00c3 (diff)
downloadnspr-hg-036d7c9045dcf6d14d0dc31e9978ccc9b5c417f5.tar.gz
Bugzilla bug #13361: fixed gcc compiler warnings. Thanks to
Steve Lamm (slamm@netscape.com) for the bug report. Modified files: prtime.h, prmwait.c, pratom.c, ptio.c, ptthread.c.
-rw-r--r--pr/include/prtime.h5
-rw-r--r--pr/src/io/prmwait.c12
-rw-r--r--pr/src/misc/pratom.c1
-rw-r--r--pr/src/pthreads/ptio.c4
-rw-r--r--pr/src/pthreads/ptthread.c3
5 files changed, 10 insertions, 15 deletions
diff --git a/pr/include/prtime.h b/pr/include/prtime.h
index 1df2e6cd..6b748958 100644
--- a/pr/include/prtime.h
+++ b/pr/include/prtime.h
@@ -195,7 +195,8 @@ PR_ImplodeTime(const PRExplodedTime *exploded);
* should treat them as "read-only".
*/
-PR_EXTERN(void) PR_NormalizeTime(PRExplodedTime *time, PRTimeParamFn params);
+PR_EXTERN(void) PR_NormalizeTime(
+ PRExplodedTime *exploded, PRTimeParamFn params);
/**********************************************************************/
/*********************** TIME PARAMETER FUNCTIONS *********************/
@@ -269,7 +270,7 @@ PR_EXTERN(PRUint32) PR_FormatTime(char *buf, int buflen, const char *fmt,
*/
PR_EXTERN(PRUint32)
PR_FormatTimeUSEnglish( char* buf, PRUint32 bufSize,
- const char* format, const PRExplodedTime* time );
+ const char* format, const PRExplodedTime* tm );
#endif /* NO_NSPR_10_SUPPORT */
diff --git a/pr/src/io/prmwait.c b/pr/src/io/prmwait.c
index 98af028c..a3bd1576 100644
--- a/pr/src/io/prmwait.c
+++ b/pr/src/io/prmwait.c
@@ -1060,7 +1060,7 @@ PR_IMPLEMENT(PRStatus) PR_CancelWaitFileDesc(PRWaitGroup *group, PRRecvWait *des
{
PR_SetError(PR_INVALID_STATE_ERROR, 0);
rv = PR_FAILURE;
- goto stopping;
+ goto unlock;
}
#ifdef WINNT
@@ -1072,7 +1072,7 @@ PR_IMPLEMENT(PRStatus) PR_CancelWaitFileDesc(PRWaitGroup *group, PRRecvWait *des
if (NULL == bottom)
{
PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
- goto invalid_arg;
+ goto unlock;
}
bottom->secret->state = _PR_FILEDESC_CLOSED;
#if 0
@@ -1089,7 +1089,7 @@ PR_IMPLEMENT(PRStatus) PR_CancelWaitFileDesc(PRWaitGroup *group, PRRecvWait *des
{
/* it was in the wait table */
_MW_DoneInternal(group, recv_wait, PR_MW_INTERRUPT);
- goto found;
+ goto unlock;
}
if (!PR_CLIST_IS_EMPTY(&group->io_ready))
{
@@ -1098,17 +1098,15 @@ PR_IMPLEMENT(PRStatus) PR_CancelWaitFileDesc(PRWaitGroup *group, PRRecvWait *des
do
{
PRRecvWait *done = (PRRecvWait*)head;
- if (done == desc) goto found;
+ if (done == desc) goto unlock;
head = PR_NEXT_LINK(head);
} while (head != &group->io_ready);
}
PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
rv = PR_FAILURE;
-found:
#endif
-stopping:
-invalid_arg:
+unlock:
PR_Unlock(group->ml);
return rv;
} /* PR_CancelWaitFileDesc */
diff --git a/pr/src/misc/pratom.c b/pr/src/misc/pratom.c
index b611871c..44c47e4b 100644
--- a/pr/src/misc/pratom.c
+++ b/pr/src/misc/pratom.c
@@ -86,7 +86,6 @@ void _PR_MD_INIT_ATOMIC()
{
char *eval;
int index;
-PRIntn lock_count;
PR_ASSERT(PR_FloorLog2(MAX_ATOMIC_LOCKS) ==
diff --git a/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c
index 3f555600..eabf762a 100644
--- a/pr/src/pthreads/ptio.c
+++ b/pr/src/pthreads/ptio.c
@@ -719,7 +719,6 @@ static void pt_ContinuationThreadInternal(pt_Continuation *my_op)
for (pollIndex = 0; pollIndex < pollingListUsed; ++pollIndex)
{
- PRIntn fd = pollingList[pollIndex].fd;
PRInt16 events = pollingList[pollIndex].events;
PRInt16 revents = pollingList[pollIndex].revents;
@@ -1218,8 +1217,6 @@ static PRBool pt_hpux_transmitfile_cont(pt_Continuation *op, PRInt16 revents)
void _PR_InitIO()
{
- PRIntn rv;
-
pt_tq.ml = PR_NewLock();
PR_ASSERT(NULL != pt_tq.ml);
@@ -2290,7 +2287,6 @@ static PRInt32 pt_AcceptRead(
return rv;
}
-failed:
PR_Close(accepted);
return rv;
} /* pt_AcceptRead */
diff --git a/pr/src/pthreads/ptthread.c b/pr/src/pthreads/ptthread.c
index e8f82d12..943ea926 100644
--- a/pr/src/pthreads/ptthread.c
+++ b/pr/src/pthreads/ptthread.c
@@ -201,7 +201,6 @@ static void *_pt_root(void *arg)
static PRThread* pt_AttachThread(void)
{
PRThread *thred = NULL;
- void *privateData = NULL;
/*
* NSPR must have been initialized when PR_AttachThread is called.
@@ -955,7 +954,9 @@ static sigset_t javagc_intsoff_sigmask;
static sigset_t sigwait_set;
static struct timespec onemillisec = {0, 1000000L};
+#ifndef PT_NO_SIGTIMEDWAIT
static struct timespec hundredmillisec = {0, 100000000L};
+#endif
static void suspend_signal_handler(PRIntn sig);