* prof_file.c: Cast return from prof_mutex_lock and
authorEzra Peisach <epeisach@mit.edu>
Mon, 23 Dec 2002 18:08:02 +0000 (18:08 +0000)
committerEzra Peisach <epeisach@mit.edu>
Mon, 23 Dec 2002 18:08:02 +0000 (18:08 +0000)
        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

src/util/profile/ChangeLog
src/util/profile/prof_file.c

index 38c67105a57e33c5591e81067ad1ffde0bfb6678..d641fc5c01dd12434c4f05532af2d8852a6a6fb4 100644 (file)
@@ -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
index b3cee881c61e9e0f99b2aadefec158aa8e33e235..d2022da3524740e329d4b71e4afa033b153e71fe 100644 (file)
@@ -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