]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Squash pthreaded ubik warnings
authorAndrew Deason <adeason@sinenomine.net>
Mon, 25 Jan 2010 22:56:13 +0000 (16:56 -0600)
committerDerrick Brashear <shadow|account-1000005@unknown>
Tue, 2 Feb 2010 17:31:56 +0000 (09:31 -0800)
Fix/ignore some warnings with --enable-pthreaded-ubik:

 - ubik/ubik.c: move rx_stackSize decl to non-pthread code, since it's
   only used there

 - budb/db_dump.c: move 'code' decl to non-pthread code, since it's only
   used there

 - ubik/recovery.c: move return to outside the ifdef, so we still have a
   return statement in the pthreaded case

 - Add -Wno-error to beacon.c in tubik, to match the ubik case

Change-Id: I614f2425c36e77bb1a08838b45166d8edb080c73
Reviewed-on: http://gerrit.openafs.org/1211
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/budb/db_dump.c
src/budb/server.c
src/tubik/Makefile.in
src/ubik/recovery.c
src/ubik/ubik.c

index 80d751391858a0cabb723a39094c717d864682f0..f971a4b679ac43bbe8d6d0e17ab548053a1661f8 100644 (file)
@@ -62,7 +62,9 @@ dumpSyncP dumpSyncPtr = &dumpSync;
 afs_int32
 canWrite(int fid)
 {
+#ifndef AFS_PTHREAD_ENV
     afs_int32 code = 0;
+#endif
     extern dumpSyncP dumpSyncPtr;
 
     ObtainWriteLock(&dumpSyncPtr->ds_lock);
@@ -104,7 +106,9 @@ canWrite(int fid)
 void
 haveWritten(afs_int32 nbytes)
 {
+#ifndef AFS_PTHREAD_ENV
     afs_int32 code = 0;
+#endif
     extern dumpSyncP dumpSyncPtr;
 
     dumpSyncPtr->ds_bytes += nbytes;
@@ -129,7 +133,9 @@ haveWritten(afs_int32 nbytes)
 void
 doneWriting(afs_int32 error)
 {
+#ifndef AFS_PTHREAD_ENV
     afs_int32 code = 0;
+#endif
 
     /* wait for the reader */
     ObtainWriteLock(&dumpSyncPtr->ds_lock);
index f232cad63161183aba5eabfa91c811379d6287e9..63e538ac411ddc4b53cff44e3e18820a1e7423c9 100644 (file)
@@ -80,10 +80,10 @@ int lwps   = 3;
 afs_uint32 SHostAddrs[ADDRSPERSITE];
 
 #if defined(AFS_PTHREAD_ENV)
-char *
+static int
 threadNum(void)
 {
-    return pthread_getspecific(rx_thread_id_key);
+    return (intptr_t)pthread_getspecific(rx_thread_id_key);
 }
 #endif
 
index c47558519f4b35c13925f24d3f7db4f481540c08..2e626f1eed6ec8e87e411d96604d4f31a4ca2287 100644 (file)
@@ -199,7 +199,7 @@ remote.o: ${srcdir}/remote.c
        ${CCRULE}
 
 beacon.o: ${srcdir}/beacon.c
-       ${CCRULE}
+       ${CCRULE} @CFLAGS_NOERROR@
 
 lock.o: ${srcdir}/lock.c
        ${CCRULE}
index ccbd34692da51edfbf0e87fcef5c3edddce79272..01f279ecdd7070f9567b417b3e414590e2023a44 100644 (file)
@@ -94,8 +94,8 @@ urecovery_LostServer(void)
 #if !defined(AFS_PTHREAD_ENV)
     /*  No corresponding LWP_WaitProcess found anywhere for this -- klm */
     LWP_NoYieldSignal(&urecovery_state);
-    return 0;
 #endif
+    return 0;
 }
 
 /*!
index f72032f9a1977b747d8b12cdee3492a343c94c90..4bcfe4920c1934f82b13f9b96cd280f5f0b3a280 100644 (file)
@@ -399,13 +399,13 @@ ubik_ServerInitCommon(afs_int32 myHost, short myPort,
     pthread_attr_t urecovery_Interact_tattr;
 #else
     PROCESS junk;
+    extern int rx_stackSize;
 #endif
 
     afs_int32 secIndex;
     struct rx_securityClass *secClass;
 
     struct rx_service *tservice;
-    extern int rx_stackSize;
 
     initialize_U_error_table();