C: added missing cast to silence compile warnings