contrib/.../stm32h7xx_hal_nand.c: Address set but unused warnings

GCC 16 flagged this while GCC 15 did not. Rather then ifdef out
all references, added the "(void) variable" hints to minimize
RTEMS specific changes.
This commit is contained in:
Joel Sherrill
2026-04-12 07:32:31 -05:00
committed by Kinsey Moore
parent b346eedc1f
commit 57e61f16b6
@@ -662,6 +662,11 @@ HAL_StatusTypeDef HAL_NAND_Read_Page_8b(NAND_HandleTypeDef *hnand, const NAND_Ad
return HAL_ERROR;
}
#ifdef __rtems__
/* address set but not used warnings */
(void) numpagesread;
#endif
return HAL_OK;
}
@@ -830,6 +835,11 @@ HAL_StatusTypeDef HAL_NAND_Read_Page_16b(NAND_HandleTypeDef *hnand, const NAND_A
return HAL_ERROR;
}
#ifdef __rtems__
/* address set but not used warnings */
(void) numpagesread;
#endif
return HAL_OK;
}
@@ -983,6 +993,11 @@ HAL_StatusTypeDef HAL_NAND_Write_Page_8b(NAND_HandleTypeDef *hnand, const NAND_A
return HAL_ERROR;
}
#ifdef __rtems__
/* address set but not used warnings */
(void) numpageswritten;
#endif
return HAL_OK;
}
@@ -1147,6 +1162,11 @@ HAL_StatusTypeDef HAL_NAND_Write_Page_16b(NAND_HandleTypeDef *hnand, const NAND_
return HAL_ERROR;
}
#ifdef __rtems__
/* address set but not used warnings */
(void) numpageswritten;
#endif
return HAL_OK;
}
@@ -1312,6 +1332,16 @@ HAL_StatusTypeDef HAL_NAND_Read_SpareArea_8b(NAND_HandleTypeDef *hnand, const NA
return HAL_ERROR;
}
#ifdef __rtems__
/* address set but not used warnings */
(void) numsparearearead;
#endif
#ifdef __rtems__
/* address set but not used warnings */
(void) numsparearearead;
#endif
return HAL_OK;
}
@@ -1477,6 +1507,11 @@ HAL_StatusTypeDef HAL_NAND_Read_SpareArea_16b(NAND_HandleTypeDef *hnand, const N
return HAL_ERROR;
}
#ifdef __rtems__
/* address set but not used warnings */
(void) numsparearearead;
#endif
return HAL_OK;
}
@@ -1640,6 +1675,11 @@ HAL_StatusTypeDef HAL_NAND_Write_SpareArea_8b(NAND_HandleTypeDef *hnand, const N
return HAL_ERROR;
}
#ifdef __rtems__
/* address set but not used warnings */
(void) numspareareawritten;
#endif
return HAL_OK;
}
@@ -1803,6 +1843,11 @@ HAL_StatusTypeDef HAL_NAND_Write_SpareArea_16b(NAND_HandleTypeDef *hnand, const
return HAL_ERROR;
}
#ifdef __rtems__
/* address set but not used warnings */
(void) numspareareawritten;
#endif
return HAL_OK;
}