ubik: Correct thread creation function signatures

The Solaris Studio compiler emits the following warnings:

  "ubik.c", line 363: warning: argument #3 is incompatible with prototype:
        prototype: pointer to function(pointer to void) returning
		    pointer to void : "/usr/include/pthread.h", line 209
        argument : pointer to void
  "ubik.c", line 363: warning: argument #3 is incompatible with prototype:
        prototype: pointer to function(pointer to void) returning
		     pointer to void : "/usr/include/pthread.h", line 218
        argument : pointer to void
  "ubik.c", line 508: warning: argument #3 is incompatible with prototype:
        prototype: pointer to function(pointer to void) returning
		    pointer to void : "ubik.c", line 359
        argument : pointer to void
  "ubik.c", line 522: warning: argument #3 is incompatible with prototype:
        prototype: pointer to function(pointer to void) returning
		    pointer to void : "ubik.c", line 359
        argument : pointer to void
  "ubik.c", line 533: warning: argument #3 is incompatible with prototype:
        prototype: pointer to function(pointer to void) returning
		    pointer to void : "ubik.c", line 359
        argument : pointer to void

Adjust the signature for ubik_thread_create().
Remove any superfluous casts its callers make on argument #3.

Change-Id: Id3cb3abfcd51fe263098371ac0fa1fdcd5e44f96
Reviewed-on: https://gerrit.openafs.org/16059
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Ben Huntsman <ben@huntsmans.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Mark Vitale 2024-07-03 12:01:33 -04:00 committed by Andrew Deason
parent 6e4bf61d36
commit d0714dfd50

View File

@ -356,7 +356,8 @@ ContactQuorum_DISK_SetVersion(struct ubik_trans *atrans, int aflags,
#if defined(AFS_PTHREAD_ENV)
static int
ubik_thread_create(pthread_attr_t *tattr, pthread_t *thread, void *proc) {
ubik_thread_create(pthread_attr_t *tattr, pthread_t *thread, void *(* proc)(void *))
{
opr_Verify(pthread_attr_init(tattr) == 0);
opr_Verify(pthread_attr_setdetachstate(tattr,
PTHREAD_CREATE_DETACHED) == 0);
@ -505,7 +506,7 @@ ubik_ServerInitCommon(afs_uint32 myHost, short myPort,
* the "steplock" problem in ubik initialization. Defect 11037.
*/
#ifdef AFS_PTHREAD_ENV
ubik_thread_create(&rxServer_tattr, &rxServerThread, (void *)rx_ServerProc);
ubik_thread_create(&rxServer_tattr, &rxServerThread, rx_ServerProc);
#else
LWP_CreateProcess(rx_ServerProc, rx_stackSize, RX_PROCESS_PRIORITY,
NULL, "rx_ServerProc", &junk);
@ -519,7 +520,7 @@ ubik_ServerInitCommon(afs_uint32 myHost, short myPort,
/* now start up async processes */
#ifdef AFS_PTHREAD_ENV
ubik_thread_create(&ubeacon_Interact_tattr, &ubeacon_InteractThread,
(void *)ubeacon_Interact);
ubeacon_Interact);
#else
code = LWP_CreateProcess(ubeacon_Interact, 16384 /*8192 */ ,
LWP_MAX_PRIORITY - 1, (void *)0, "beacon",
@ -530,7 +531,7 @@ ubik_ServerInitCommon(afs_uint32 myHost, short myPort,
#ifdef AFS_PTHREAD_ENV
ubik_thread_create(&urecovery_Interact_tattr, &urecovery_InteractThread,
(void *)urecovery_Interact);
urecovery_Interact);
return 0; /* is this correct? - klm */
#else
code = LWP_CreateProcess(urecovery_Interact, 16384 /*8192 */ ,