Fix compiler warnings on Mac; checkin for brade
authorsrinivas%netscape.com
Thu, 24 Dec 1998 22:03:37 +0000
changeset 376 3df57c5ef2e43c0bf9ef86168790d65abca04551
parent 375 4ef5d5dbd9c268449d937fb517eb8758b1a3a097
child 378 94d1b0476c7bf36d43d2916545c455860101f875
push idunknown
push userunknown
push dateunknown
Fix compiler warnings on Mac; checkin for brade
pr/src/io/prfile.c
pr/src/io/prio.c
pr/src/io/prmwait.c
pr/src/io/prsocket.c
pr/src/misc/prolock.c
pr/src/threads/combined/pruthr.c
pr/src/threads/prcthr.c
--- a/pr/src/io/prfile.c
+++ b/pr/src/io/prfile.c
@@ -100,16 +100,19 @@ static PRInt32 PR_CALLBACK FileSeek(PRFi
     PRInt32 result;
 
     result = _PR_MD_LSEEK(fd, offset, whence);
     return result;
 }
 
 static PRInt64 PR_CALLBACK FileSeek64(PRFileDesc *fd, PRInt64 offset, PRSeekWhence whence)
 {
+#ifdef XP_MAC
+#pragma unused( fd, offset, whence )
+#endif
     PRInt64 result;
 
     result = _PR_MD_LSEEK64(fd, offset, whence);
     return result;
 }
 
 static PRInt32 PR_CALLBACK FileAvailable(PRFileDesc *fd)
 {
@@ -127,16 +130,19 @@ static PRInt32 PR_CALLBACK FileAvailable
     result = end - cur;
     _PR_MD_LSEEK(fd, cur, PR_SEEK_SET);
 
     return result;
 }
 
 static PRInt64 PR_CALLBACK FileAvailable64(PRFileDesc *fd)
 {
+#ifdef XP_MAC
+#pragma unused( fd )
+#endif
     PRInt64 result, cur, end;
     PRInt64 minus_one;
 
     LL_I2L(minus_one, -1);
     cur = _PR_MD_LSEEK64(fd, LL_ZERO, PR_SEEK_CUR);
 
     if (LL_GE_ZERO(cur))
     	end = _PR_MD_LSEEK64(fd, LL_ZERO, PR_SEEK_END);
@@ -157,16 +163,19 @@ static PRStatus PR_CALLBACK FileInfo(PRF
     if (rv < 0) {
 	return PR_FAILURE;
     } else
 	return PR_SUCCESS;
 }
 
 static PRStatus PR_CALLBACK FileInfo64(PRFileDesc *fd, PRFileInfo64 *info)
 {
+#ifdef XP_MAC
+#pragma unused( fd, info )
+#endif
     /* $$$$ NOT YET IMPLEMENTED */
 	PRInt32 rv;
 
     rv = _PR_MD_GETOPENFILEINFO64(fd, info);
     if (rv < 0) return PR_FAILURE;
     else return PR_SUCCESS;
 }
 
@@ -197,16 +206,19 @@ static PRStatus PR_CALLBACK FileClose(PR
     }
     PR_FreeFileDesc(fd);
     return PR_SUCCESS;
 }
 
 static PRInt16 PR_CALLBACK FilePoll(
     PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags)
 {
+#ifdef XP_MAC
+#pragma unused( fd, in_flags )
+#endif
     *out_flags = 0;
     return in_flags;
 }  /* FilePoll */
 
 static PRIOMethods _pr_fileMethods = {
     PR_DESC_FILE,
     FileClose,
     FileRead,
@@ -350,16 +362,19 @@ PR_IMPLEMENT(PRStatus) PR_GetFileInfo(co
 	if (rv < 0) {
 		return PR_FAILURE;
 	} else
 		return PR_SUCCESS;
 }
 
 PR_IMPLEMENT(PRStatus) PR_GetFileInfo64(const char *fn, PRFileInfo64 *info)
 {
+#ifdef XP_MAC
+#pragma unused (fn, info)
+#endif
     PRInt32 rv;
 
     if (!_pr_initialized) _PR_ImplicitInitialization();
     rv = _PR_MD_GETFILEINFO64(fn, info);
     if (rv < 0) {
         return PR_FAILURE;
     } else {
         return PR_SUCCESS;
--- a/pr/src/io/prio.c
+++ b/pr/src/io/prio.c
@@ -131,12 +131,15 @@ PR_IMPLEMENT(PRStatus) PR_SetFDInheritab
     if (fd->secret->inheritable != inheritable) {
         if (_PR_MD_SET_FD_INHERITABLE(fd, inheritable) == PR_FAILURE) {
             return PR_FAILURE;
         }
         fd->secret->inheritable = inheritable;
     }
     return PR_SUCCESS;
 #else
+#ifdef XP_MAC
+#pragma unused (fd, inheritable)
+#endif
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return PR_FAILURE;
 #endif
 }
--- a/pr/src/io/prmwait.c
+++ b/pr/src/io/prmwait.c
@@ -1242,16 +1242,19 @@ invalid_arg:
 #endif
     PR_Unlock(group->ml);
 
     return recv_wait;
 }  /* PR_CancelWaitGroup */
 
 PR_IMPLEMENT(PRWaitGroup*) PR_CreateWaitGroup(PRInt32 size /* ignored */)
 {
+#ifdef XP_MAC
+#pragma unused (size)
+#endif
     PRWaitGroup *wg;
 
     if (NULL == (wg = PR_NEWZAP(PRWaitGroup)))
     {
         PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
         goto failed;
     }
     /* the wait group itself */
--- a/pr/src/io/prsocket.c
+++ b/pr/src/io/prsocket.c
@@ -978,16 +978,19 @@ static PRStatus PR_CALLBACK SocketSetSoc
         }
     }
     return rv;
 }
 
 static PRInt16 PR_CALLBACK SocketPoll(
     PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags)
 {
+#ifdef XP_MAC
+#pragma unused( fd, in_flags )
+#endif
     *out_flags = 0;
     return in_flags;
 }  /* SocketPoll */
 
 static PRIOMethods tcpMethods = {
 	PR_DESC_SOCKET_TCP,
 	SocketClose,
 	SocketRead,
--- a/pr/src/misc/prolock.c
+++ b/pr/src/misc/prolock.c
@@ -28,47 +28,59 @@
 #include "prerror.h"
 
 PR_IMPLEMENT(PROrderedLock *) 
     PR_CreateOrderedLock( 
         PRInt32 order,
         const char *name
 )
 {
+#ifdef XP_MAC
+#pragma unused( order, name )
+#endif
     PR_ASSERT(!"Not implemented"); /* Not implemented yet */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return NULL;
 } /*  end PR_CreateOrderedLock() */
 
 
 PR_IMPLEMENT(void) 
     PR_DestroyOrderedLock( 
         PROrderedLock *lock 
 )
 {
+#ifdef XP_MAC
+#pragma unused( lock )
+#endif
     PR_ASSERT(!"Not implemented"); /* Not implemented yet */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
 } /*  end PR_DestroyOrderedLock() */
 
 
 PR_IMPLEMENT(void) 
     PR_LockOrderedLock( 
         PROrderedLock *lock 
 )
 {
+#ifdef XP_MAC
+#pragma unused( lock )
+#endif
     PR_ASSERT(!"Not implemented"); /* Not implemented yet */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
 } /*  end PR_LockOrderedLock() */
 
 
 PR_IMPLEMENT(PRStatus) 
     PR_UnlockOrderedLock( 
         PROrderedLock *lock 
 )
 {
+#ifdef XP_MAC
+#pragma unused( lock )
+#endif
     PR_ASSERT(!"Not implemented"); /* Not implemented yet */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return PR_FAILURE;
 } /*  end PR_UnlockOrderedLock() */
 
 #else /* ! defined(FORCE_NSPR_ORDERED_LOCK) */
 /*
 ** NSPR Ordered Lock is not defined when !DEBUG and !FORCE_NSPR_ORDERED_LOCK
--- a/pr/src/threads/combined/pruthr.c
+++ b/pr/src/threads/combined/pruthr.c
@@ -1422,16 +1422,19 @@ PRThread* _PRI_AttachThread(PRThreadType
         }
     }
     return thread;
 }
 
 PR_IMPLEMENT(PRThread*) PR_AttachThread(PRThreadType type,
     PRThreadPriority priority, PRThreadStack *stack)
 {
+#ifdef XP_MAC
+#pragma unused( type, priority, stack )
+#endif
     return PR_GetCurrentThread();
 }
 
 PR_IMPLEMENT(void) PR_DetachThread(void)
 {
 }
 
 void _PRI_DetachThread(void)
--- a/pr/src/threads/prcthr.c
+++ b/pr/src/threads/prcthr.c
@@ -367,16 +367,19 @@ PR_IMPLEMENT(PRThread*) PR_CreateThreadB
                             stackSize, _PR_BOUND_THREAD);
 }
 #endif
 
 
 PR_IMPLEMENT(PRThread*) PR_AttachThreadGCAble(
     PRThreadType type, PRThreadPriority priority, PRThreadStack *stack)
 {
+#ifdef XP_MAC
+#pragma unused (type, priority, stack)
+#endif
     /* $$$$ not sure how to finese this one */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return NULL;
 }
 
 PR_IMPLEMENT(void) PR_SetThreadGCAble()
 {
     if (!_pr_initialized) _PR_ImplicitInitialization();
@@ -390,16 +393,19 @@ PR_IMPLEMENT(void) PR_ClearThreadGCAble(
     if (!_pr_initialized) _PR_ImplicitInitialization();
     PR_Lock(_pr_activeLock);
         _PR_MD_CURRENT_THREAD()->flags &= (~_PR_GCABLE_THREAD);
         PR_Unlock(_pr_activeLock);
 }
 
 PR_IMPLEMENT(PRThreadScope) PR_GetThreadScope(const PRThread *thread)
 {
+#ifdef XP_MAC
+#pragma unused( thread )
+#endif
     if (!_pr_initialized) _PR_ImplicitInitialization();
 
     if (_PR_IS_NATIVE_THREAD(thread))
         return PR_GLOBAL_THREAD;
     else
         return PR_LOCAL_THREAD;
 }