diff --git a/tools/widl/header.c b/tools/widl/header.c index 6cf52b17f41..6e4a8fca09f 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -363,7 +363,7 @@ void write_expr(FILE *h, const expr_t *e, int brackets) case EXPR_VOID: break; case EXPR_NUM: - fprintf(h, "%ld", e->u.lval); + fprintf(h, "%lu", e->u.lval); break; case EXPR_HEXNUM: fprintf(h, "0x%lx", e->u.lval); diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index b72e87b30fc..9d13a2d9abd 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -2177,7 +2177,7 @@ static void write_struct_expr(FILE *h, const expr_t *e, int brackets, case EXPR_VOID: break; case EXPR_NUM: - fprintf(h, "%ld", e->u.lval); + fprintf(h, "%lu", e->u.lval); break; case EXPR_HEXNUM: fprintf(h, "0x%lx", e->u.lval);