fixed gcc warning 'warning: format ‘%d’ expects argument of type ‘int*’'