--- a/ilg.gnuarmeclipse.templates.stm/templates/micro-os-plus/stm32f4-hal.pack/src/stm32f4-hal/stm32f4xx_hal_flash_ex.c
+++ b/ilg.gnuarmeclipse.templates.stm/templates/micro-os-plus/stm32f4-hal.pack/src/stm32f4-hal/stm32f4xx_hal_flash_ex.c
@@ -219,6 +219,12 @@
   return status;
 }
 
+// [ILG]
+#if defined ( __GNUC__ )
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+
 /**
   * @brief  Perform a mass erase or erase the specified FLASH memory sectors  with interrupt enabled
   * @param  pEraseInit: pointer to an FLASH_EraseInitTypeDef structure that
@@ -266,7 +272,7 @@
     pFlash.VoltageForErase = (uint8_t)pEraseInit->VoltageRange;
 
     /*Erase 1st sector and wait for IT*/
-    FLASH_Erase_Sector(pEraseInit->Sector, (uint8_t)pEraseInit->VoltageRange);
+    FLASH_Erase_Sector(pEraseInit->Sector, pEraseInit->VoltageRange);
   }
 
   return status;
@@ -308,7 +314,7 @@
   /*Read protection configuration*/
   if((pOBInit->OptionType & OPTIONBYTE_RDP) == OPTIONBYTE_RDP)
   {
-    status = FLASH_OB_RDP_LevelConfig((uint8_t)pOBInit->RDPLevel);
+    status = FLASH_OB_RDP_LevelConfig(pOBInit->RDPLevel);
   }
 
   /*USER  configuration*/
@@ -322,7 +328,7 @@
   /*BOR Level  configuration*/
   if((pOBInit->OptionType & OPTIONBYTE_BOR) == OPTIONBYTE_BOR)
   {
-    status = FLASH_OB_BOR_LevelConfig((uint8_t)pOBInit->BORLevel);
+    status = FLASH_OB_BOR_LevelConfig(pOBInit->BORLevel);
   }
 
   /* Process Unlocked */
@@ -330,6 +336,11 @@
 
   return status;
 }
+
+// [ILG]
+#if defined ( __GNUC__ )
+#pragma GCC diagnostic pop
+#endif
 
 /**
   * @brief   Get the Option byte configuration
@@ -502,6 +513,12 @@
   * @}
   */
   
+// [ILG]
+#if defined ( __GNUC__ )
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+
 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx)
 /**
   * @brief  Full erase of FLASH memory sectors 
@@ -553,6 +570,11 @@
   FLASH->CR |= FLASH_CR_STRT;
 }
 
+// [ILG]
+#if defined ( __GNUC__ )
+#pragma GCC diagnostic pop
+#endif
+
 /**
   * @brief  Erase the specified FLASH memory sector
   * @param  Sector: FLASH sector to erase
@@ -607,6 +629,12 @@
   FLASH->CR |= FLASH_CR_SER | (Sector << POSITION_VAL(FLASH_CR_SNB));
   FLASH->CR |= FLASH_CR_STRT;
 }
+
+// [ILG]
+#if defined ( __GNUC__ )
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
 
 /**
   * @brief  Enable the write protection of the desired bank1 or bank 2 sectors
@@ -680,6 +708,11 @@
   return status;
 }
 
+// [ILG]
+#if defined ( __GNUC__ )
+#pragma GCC diagnostic pop
+#endif
+
 /**
   * @brief  Disable the write protection of the desired bank1 or bank 2 sectors
   *
@@ -752,6 +785,12 @@
   return status;
 }
 
+// [ILG]
+#if defined ( __GNUC__ )
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+
 /**
   * @brief  Configure the Dual Bank Boot.
   *   
@@ -912,6 +951,11 @@
 
 }
 
+// [ILG]
+#if defined ( __GNUC__ )
+#pragma GCC diagnostic pop
+#endif
+
 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
 
 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx) || defined(STM32F401xC) || defined(STM32F401xE) 
@@ -1098,6 +1142,12 @@
 #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F401xC || STM32F401xE */
 
 #if defined(STM32F401xC) || defined(STM32F401xE)
+
+// [ILG]
+#if defined ( __GNUC__ )
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
 /**
   * @brief  Enable the read/write protection (PCROP) of the desired sectors.
   * @note   This function can be used only for STM32F401xx devices.
@@ -1153,6 +1203,12 @@
   return status;
 
 }
+
+// [ILG]
+#if defined ( __GNUC__ )
+#pragma GCC diagnostic pop
+#endif
+
 #endif /* STM32F401xC || STM32F401xE */
 
 /**