From 2dcf4a71447d22ce09e589fbc2582e327d6a2ccc Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 18 Nov 2022 11:19:01 +0100 Subject: [PATCH] fixed warnings --- slsDetectorServers/slsDetectorServer/src/ALTERA_PLL.c | 2 +- slsDetectorServers/slsDetectorServer/src/ALTERA_PLL_CYCLONE10.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL.c b/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL.c index 50fbaf540..230d3f241 100644 --- a/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL.c +++ b/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL.c @@ -274,7 +274,7 @@ int ALTERA_PLL_SetOuputFrequency(int clkIndex, int pllVCOFreqMhz, int value) { clkIndex, value, pllVCOFreqMhz)); // calculate output frequency - int total_div = (float)pllVCOFreqMhz / (float)value; + uint32_t total_div = (float)pllVCOFreqMhz / (float)value; // assume 50% duty cycle uint32_t low_count = total_div / 2; diff --git a/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL_CYCLONE10.c b/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL_CYCLONE10.c index fe2bdc610..fcf60e68b 100644 --- a/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL_CYCLONE10.c +++ b/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL_CYCLONE10.c @@ -172,7 +172,7 @@ void ALTERA_PLL_C10_SetOuputClockDivider(int pllIndex, int clkIndex, uint32_t odd_division = 0; // odd division - if (value > (2 * low_count)) { + if (value > (int)(2 * low_count)) { ++high_count; odd_division = 1; }