+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
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. */
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);
#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;
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