@@ -154,7 +154,7 @@ static int uc_insert(const data_set_t *ds, const value_list_t *vl,
154154 ce = cache_alloc (ds -> ds_num );
155155 if (ce == NULL ) {
156156 sfree (key_copy );
157- ERROR ("uc_insert: cache_alloc (%zu ) failed." , ds -> ds_num );
157+ ERROR ("uc_insert: cache_alloc (%" PRIsz " ) failed." , ds -> ds_num );
158158 return -1 ;
159159 }
160160
@@ -381,7 +381,7 @@ int uc_update(const data_set_t *ds, const value_list_t *vl) {
381381 return -1 ;
382382 } /* switch (ds->ds[i].type) */
383383
384- DEBUG ("uc_update: %s: ds[%zu ] = %lf" , name , i , ce -> values_gauge [i ]);
384+ DEBUG ("uc_update: %s: ds[%" PRIsz " ] = %lf" , name , i , ce -> values_gauge [i ]);
385385 } /* for (i) */
386386
387387 /* Update the history if it exists. */
@@ -469,8 +469,8 @@ gauge_t *uc_get_rate(const data_set_t *ds, const value_list_t *vl) {
469469 /* This is important - the caller has no other way of knowing how many
470470 * values are returned. */
471471 if (ret_num != ds -> ds_num ) {
472- ERROR ("utils_cache: uc_get_rate: ds[%s] has %zu values, "
473- "but uc_get_rate_by_name returned %zu ." ,
472+ ERROR ("utils_cache: uc_get_rate: ds[%s] has %" PRIsz " values, "
473+ "but uc_get_rate_by_name returned %" PRIsz " ." ,
474474 ds -> type , ds -> ds_num , ret_num );
475475 sfree (ret );
476476 return NULL ;
@@ -488,7 +488,7 @@ int uc_get_value_by_name(const char *name, value_t **ret_values,
488488
489489 pthread_mutex_lock (& cache_lock );
490490
491- if (c_avl_get (cache_tree , name , (void * ) & ce ) == 0 ) {
491+ if (c_avl_get (cache_tree , name , (void * )& ce ) == 0 ) {
492492 assert (ce != NULL );
493493
494494 /* remove missing values from getval */
@@ -504,8 +504,7 @@ int uc_get_value_by_name(const char *name, value_t **ret_values,
504504 memcpy (ret , ce -> values_raw , ret_num * sizeof (value_t ));
505505 }
506506 }
507- }
508- else {
507+ } else {
509508 DEBUG ("utils_cache: uc_get_value_by_name: No such value: %s" , name );
510509 status = -1 ;
511510 }
@@ -537,10 +536,10 @@ value_t *uc_get_value(const data_set_t *ds, const value_list_t *vl) {
537536
538537 /* This is important - the caller has no other way of knowing how many
539538 * values are returned. */
540- if (ret_num != (size_t ) ds -> ds_num ) {
541- ERROR ("utils_cache: uc_get_value: ds[%s] has %zu values, "
542- "but uc_get_value_by_name returned %zu." , ds -> type , ds -> ds_num ,
543- ret_num );
539+ if (ret_num != (size_t )ds -> ds_num ) {
540+ ERROR ("utils_cache: uc_get_value: ds[%s] has %" PRIsz " values, "
541+ "but uc_get_value_by_name returned %" PRIsz "." ,
542+ ds -> type , ds -> ds_num , ret_num );
544543 sfree (ret );
545544 return (NULL );
546545 }
0 commit comments