From dbdadaa3f3c647476723b5ed2bb80806e5543457 Mon Sep 17 00:00:00 2001 From: bbbradsmith Date: Wed, 3 May 2023 16:59:48 -0400 Subject: [PATCH] accidental tabs, printf long expectts explicit %ld --- src/cc65/datatype.c | 4 ++-- src/cc65/typeconv.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cc65/datatype.c b/src/cc65/datatype.c index 103a3a634..9334db40b 100644 --- a/src/cc65/datatype.c +++ b/src/cc65/datatype.c @@ -671,8 +671,8 @@ const Type* ArithmeticConvert (const Type* lhst, const Type* rhst) ** The integral promotions are performed on both operands. */ if (IsClassFloat(lhst) || IsClassFloat(rhst)) { - Error ("Floating point arithmetic not supported."); - return type_long; + Error ("Floating point arithmetic not supported."); + return type_long; } lhst = IntPromotion (lhst); rhst = IntPromotion (rhst); diff --git a/src/cc65/typeconv.c b/src/cc65/typeconv.c index 4e2249836..1003b3c90 100644 --- a/src/cc65/typeconv.c +++ b/src/cc65/typeconv.c @@ -129,7 +129,7 @@ static void DoConversion (ExprDesc* Expr, const Type* NewType, int Explicit) if (IsClassFloat (OldType) && IsClassInt (NewType)) { long IVal = (long)Expr->V.FVal.V; if ((Expr->V.FVal.V != FP_D_FromInt(IVal).V) && !Explicit) { - Warning ("Floating point constant (%f) converted to integer loses precision (%d)",Expr->V.FVal.V,IVal); + Warning ("Floating point constant (%f) converted to integer loses precision (%ld)",Expr->V.FVal.V,IVal); } Expr->IVal = IVal; }