You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/04/04 03:50:41 UTC
(nuttx) branch master updated: arch/arm/src/am335x: Fix incorrect signedness of variable
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new f2082acfd7 arch/arm/src/am335x: Fix incorrect signedness of variable
f2082acfd7 is described below
commit f2082acfd77822a9ef713766a90bbe4592608844
Author: Mingjie Shen <sh...@purdue.edu>
AuthorDate: Wed Apr 3 16:25:13 2024 -0400
arch/arm/src/am335x: Fix incorrect signedness of variable
The check `if (delta < 0)` in line 353 and 407 would always be false
if delta were unsigned.
Signed-off-by: Mingjie Shen <sh...@purdue.edu>
---
arch/arm/src/am335x/am335x_lcdc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/src/am335x/am335x_lcdc.c b/arch/arm/src/am335x/am335x_lcdc.c
index 5e9608450e..a650032bb1 100644
--- a/arch/arm/src/am335x/am335x_lcdc.c
+++ b/arch/arm/src/am335x/am335x_lcdc.c
@@ -338,7 +338,7 @@ done:
static uint32_t am335x_lcd_divisor(uint32_t reference, uint32_t frequency)
{
uint32_t div;
- uint32_t delta;
+ int32_t delta;
uint32_t mindelta;
int i;
@@ -374,7 +374,7 @@ static int am335x_set_refclk(uint32_t frequency)
uint32_t sysclk;
uint32_t mul;
uint32_t div;
- uint32_t delta;
+ int32_t delta;
uint32_t mindelta;
int timeout;
int i;