[HAL][PWR] Invoke macro UNUSED() in HAL_PWR_ConfigAttributes() to avoid compilation warnings due to unused parameter
diff --git a/Src/stm32l5xx_hal_pwr.c b/Src/stm32l5xx_hal_pwr.c
index 8bbf047..8310c5f 100644
--- a/Src/stm32l5xx_hal_pwr.c
+++ b/Src/stm32l5xx_hal_pwr.c
@@ -674,7 +674,6 @@
 void HAL_PWR_ConfigAttributes(uint32_t Item, uint32_t Attributes)
 {
   /* Check the parameters */
-  assert_param(IS_PWR_ITEMS_ATTRIBUTES(Item));
   assert_param(IS_PWR_ATTRIBUTES(Attributes));
 
   /* Privilege/non-privilege attribute */
@@ -694,6 +693,9 @@
 
 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
 
+  /* Check the parameters */
+  assert_param(IS_PWR_ITEMS_ATTRIBUTES(Item));
+
   /* Secure/non-secure attribute */
   if ((Attributes & PWR_SEC) == PWR_SEC)
   {
@@ -708,6 +710,11 @@
     /* do nothing */
   }
 
+#else
+
+  /* Prevent unused argument(s) compilation warning */
+  UNUSED(Item);
+
 #endif /* __ARM_FEATURE_CMSE */
 }
 
@@ -729,9 +736,6 @@
     return HAL_ERROR;
   }
 
-  /* Check the parameters */
-  assert_param(IS_PWR_ITEMS_ATTRIBUTES(Item));
-
   /* Get privilege or non-privilege attribute */
   if (READ_BIT(PWR->PRIVCFGR, PWR_PRIVCFGR_PRIV) != 0x00U)
   {
@@ -744,6 +748,9 @@
 
 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
 
+  /* Check the parameters */
+  assert_param(IS_PWR_ITEMS_ATTRIBUTES(Item));
+
   /* Get the secure or non-secure attribute state */
   if ((PWR_S->SECCFGR & Item) == Item)
   {
@@ -754,6 +761,11 @@
     attributes |= PWR_NSEC;
   }
 
+#else
+
+  /* Prevent unused argument(s) compilation warning */
+  UNUSED(Item);
+
 #endif /* __ARM_FEATURE_CMSE */
 
   /* return value */