aboutsummaryrefslogtreecommitdiff
path: root/src/util/profile
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2002-12-23 18:08:02 +0000
committerEzra Peisach <epeisach@mit.edu>2002-12-23 18:08:02 +0000
commite1005575ffda3f380afcd6d4fab5559ba402c065 (patch)
tree1f1211ec47fb75a981ca6019614eda91959192ed /src/util/profile
parent3dfda778fd007686f1d5edd0f434d45d74ac982b (diff)
downloadkrb5-e1005575ffda3f380afcd6d4fab5559ba402c065.zip
krb5-e1005575ffda3f380afcd6d4fab5559ba402c065.tar.gz
krb5-e1005575ffda3f380afcd6d4fab5559ba402c065.tar.bz2
* 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
Diffstat (limited to 'src/util/profile')
-rw-r--r--src/util/profile/ChangeLog6
-rw-r--r--src/util/profile/prof_file.c14
2 files changed, 13 insertions, 7 deletions
diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog
index 38c6710..d641fc5 100644
--- a/src/util/profile/ChangeLog
+++ b/src/util/profile/ChangeLog
@@ -1,3 +1,9 @@
+2002-12-23 Ezra Peisach <epeisach@bu.edu>
+
+ * 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 <raeburn@mit.edu>
* 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 b3cee88..d2022da 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