From: Ezra Peisach Date: Mon, 23 Dec 2002 18:08:02 +0000 (+0000) Subject: * prof_file.c: Cast return from prof_mutex_lock and X-Git-Tag: krb5-1.3-alpha1~208 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e1005575ffda3f380afcd6d4fab5559ba402c065;p=krb5.git * prof_file.c: Cast return from prof_mutex_lock and prof_mutex_unlock to void to avoid warnings of code with no side effects. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15066 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index 38c67105a..d641fc5c0 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,9 @@ +2002-12-23 Ezra Peisach + + * prof_file.c: Cast return from prof_mutex_lock and + prof_mutex_unlock to void to avoid warnings of code with no side + effects. + 2002-12-20 Ken Raeburn * prof_int.h: Define USE_PTHREADS and include pthread.h if on diff --git a/src/util/profile/prof_file.c b/src/util/profile/prof_file.c index b3cee881c..d2022da35 100644 --- a/src/util/profile/prof_file.c +++ b/src/util/profile/prof_file.c @@ -90,7 +90,7 @@ errcode_t profile_open_file(filespec, ret_prof) prf->magic = PROF_MAGIC_FILE; #ifdef SHARE_TREE_DATA - prof_mutex_lock(&g_shared_trees_mutex); + (void) prof_mutex_lock(&g_shared_trees_mutex); for (data = g_shared_trees; data; data = data->next) { if (!strcmp(data->filespec, filespec) /* Check that current uid has read access. */ @@ -100,12 +100,12 @@ errcode_t profile_open_file(filespec, ret_prof) if (data) { retval = profile_update_file_data(data); data->refcount++; - prof_mutex_unlock(&g_shared_trees_mutex); + (void) prof_mutex_unlock(&g_shared_trees_mutex); prf->data = data; *ret_prof = prf; return retval; } - prof_mutex_unlock(&g_shared_trees_mutex); + (void) prof_mutex_unlock(&g_shared_trees_mutex); data = malloc(sizeof(struct _prf_data_t)); if (data == NULL) { free(prf); @@ -146,10 +146,10 @@ errcode_t profile_open_file(filespec, ret_prof) #ifdef SHARE_TREE_DATA data->flags |= PROFILE_FILE_SHARED; - prof_mutex_lock(&g_shared_trees_mutex); + (void) prof_mutex_lock(&g_shared_trees_mutex); data->next = g_shared_trees; g_shared_trees = data; - prof_mutex_unlock(&g_shared_trees_mutex); + (void) prof_mutex_unlock(&g_shared_trees_mutex); #endif *ret_prof = prf; @@ -323,11 +323,11 @@ errout: void profile_dereference_data(prf_data_t data) { #ifdef SHARE_TREE_DATA - prof_mutex_lock(&g_shared_trees_mutex); + (void) prof_mutex_lock(&g_shared_trees_mutex); data->refcount--; if (data->refcount == 0) profile_free_file_data(data); - prof_mutex_unlock(&g_shared_trees_mutex); + (void) prof_mutex_unlock(&g_shared_trees_mutex); #else profile_free_file_data(data); #endif