Supress annoing unused warnings (#2216)

This commit is contained in:
Andrey G 2021-01-11 16:49:20 +03:00 committed by GitHub
parent a5266cd6ef
commit 25560b85c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 27 additions and 79 deletions

View File

@ -176,77 +176,6 @@ void setMiata1990(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
// todo: idleValvePin
}
static void setMiata1994_common(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
commonMiataNa(PASS_CONFIG_PARAMETER_SIGNATURE);
engineConfiguration->specs.displacement = 1.839;
// set cranking_timing_angle 0
engineConfiguration->crankingTimingAngle = 0;
engineConfiguration->crankingChargeAngle = 70;
#if IGN_LOAD_COUNT == DEFAULT_IGN_LOAD_COUNT
MEMCPY(config->ignitionTable, miataNA8_maf_advance_table);
#endif
// engineConfiguration->triggerSimulatorPins[0] = GPIOD_2; // 2G - YEL/BLU
// engineConfiguration->triggerSimulatorPins[1] = GPIOB_3; // 2E - WHT - four times
// engineConfiguration->triggerSimulatorPinModes[0] = OM_OPENDRAIN;
// engineConfiguration->triggerSimulatorPinModes[1] = OM_OPENDRAIN;
//
// engineConfiguration->triggerInputPins[0] = GPIO_UNASSIGNED;
// engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
//
// engineConfiguration->is_enabled_spi_1 = false;
// engineConfiguration->is_enabled_spi_2 = false;
// engineConfiguration->is_enabled_spi_3 = false;
/**
* Outputs
*/
// Frankenso low out #: PE6
// Frankenso low out #: PE5
// Frankenso low out #:
// Frankenso low out #:
// Frankenso low out #5: PE3
// Frankenso low out #6: PE4
// Frankenso low out #7: PE1 (do not use with discovery!)
// Frankenso low out #8:
// Frankenso low out #9: PB9
// Frankenso low out #10: PE0 (do not use with discovery!)
// Frankenso low out #11: PB8
// Frankenso low out #12: PB7
engineConfiguration->fanPin = GPIOE_6;
engineConfiguration->o2heaterPin = GPIO_UNASSIGNED;
engineConfiguration->fuelPumpPin = GPIOE_4;
engineConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
engineConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
engineConfiguration->injectionPinMode = OM_DEFAULT;
engineConfiguration->idle.solenoidPin = GPIOB_9;
engineConfiguration->ignitionPins[0] = GPIOE_14; // Frankenso high side - pin 1G
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
engineConfiguration->ignitionPins[2] = GPIOC_7; // Frankenso high side - pin 1H
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
engineConfiguration->ignitionPinMode = OM_DEFAULT;
setFrankenso_01_LCD(engineConfiguration);
commonFrankensoAnalogInputs(engineConfiguration);
engineConfiguration->tps1_1AdcChannel = EFI_ADC_2; // PA2
engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
engineConfiguration->mafAdcChannel = EFI_ADC_0;
engineConfiguration->clt.adcChannel = EFI_ADC_12;
engineConfiguration->iat.adcChannel = EFI_ADC_11;
// end of 1994 commond
}
/**
* Tom tomiata, Frankenstein board
*/

View File

@ -119,12 +119,13 @@ static void sayHello(void) {
}
void validateStack(const char*msg, obd_code_e code, int desiredStackUnusedSize) {
#if CH_DBG_THREADS_PROFILING && CH_DBG_FILL_THREADS
int unusedStack = CountFreeStackSpace(chThdGetSelfX()->wabase);
if (unusedStack < desiredStackUnusedSize) {
warning(code, "Stack low on %s: %d", msg, unusedStack);
}
#else
(void)msg; (void)code; (void)desiredStackUnusedSize;
#endif
}

View File

@ -157,6 +157,8 @@ void writeLogLine(Writer& buffer) {
}
binaryLogCount++;
#else
(void)buffer;
#endif /* EFI_FILE_LOGGING */
}

View File

@ -360,6 +360,7 @@ static int getIgnitionPinForIndex(int cylinderIndex DECLARE_ENGINE_PARAMETER_SUF
}
void prepareIgnitionPinIndices(ignition_mode_e ignitionMode DECLARE_ENGINE_PARAMETER_SUFFIX) {
(void)ignitionMode;
#if EFI_ENGINE_CONTROL
for (int cylinderIndex = 0; cylinderIndex < CONFIG(specs.cylindersCount); cylinderIndex++) {
ENGINE(ignitionPin[cylinderIndex]) = getIgnitionPinForIndex(cylinderIndex PASS_ENGINE_PARAMETER_SUFFIX);

View File

@ -118,6 +118,8 @@ const ADCConversionGroup* getConversionGroup(uint8_t cylinderIndex) {
if (cylinderUsesChannel2(cylinderIndex)) {
return &adcConvGroupCh2;
}
#else
(void)cylinderIndex;
#endif // KNOCK_HAS_CH2
return &adcConvGroupCh1;

View File

@ -359,7 +359,8 @@ void handleTsW(ts_channel_s *tsChannel, char *input) {
if (isLogFile(fileName)) {
int dotIndex = indexOf(fileName, DOT);
if (0 == strncmp(input + 6, &fileName[dotIndex - 4], 4)) {
FRESULT err = f_open(&uploading, fileName, FA_READ);// This file has the index for next log file name
/* FRESULT err = */
f_open(&uploading, fileName, FA_READ);// This file has the index for next log file name
break;
}
}

View File

@ -121,6 +121,8 @@ int getPortPinIndex(ioportid_t port, ioportmask_t pin) {
}
ioportid_t getHwPort(const char *msg, brain_pin_e brainPin) {
(void)msg;
if (!isBrainPinValid(brainPin)) {
/*
* https://github.com/dron0gus please help

View File

@ -406,6 +406,7 @@ void HAL_FLASH_IRQHandler(void)
*/
__weak void HAL_FLASH_EndOfOperationCallback(uint32_t ReturnValue)
{
(void)ReturnValue;
/* NOTE : This function Should not be modified, when the callback is needed,
the HAL_FLASH_EndOfOperationCallback could be implemented in the user file
*/
@ -421,6 +422,7 @@ __weak void HAL_FLASH_EndOfOperationCallback(uint32_t ReturnValue)
*/
__weak void HAL_FLASH_OperationErrorCallback(uint32_t ReturnValue)
{
(void)ReturnValue;
/* NOTE : This function Should not be modified, when the callback is needed,
the HAL_FLASH_OperationErrorCallback could be implemented in the user file
*/
@ -565,9 +567,9 @@ uint32_t HAL_FLASH_GetError(void)
* @retval HAL Status
*/
HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout)
{
{
(void)Timeout;
/* Clear Error Code */
pFlash.ErrorCode = HAL_FLASH_ERROR_NONE;

View File

@ -1001,6 +1001,9 @@ static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t SectorBank1, uint32_t Se
*/
static void FLASH_MassErase(uint8_t VoltageRange, uint32_t Banks)
{
(void)VoltageRange;
(void)Banks;
uint32_t tmp_psize = 0;
/* Check the parameters */
@ -1083,6 +1086,8 @@ void FLASH_Erase_Sector(uint32_t Sector, uint8_t VoltageRange)
*/
static HAL_StatusTypeDef FLASH_OB_EnableWRP(uint32_t WRPSector, uint32_t Banks)
{
(void)Banks;
HAL_StatusTypeDef status = HAL_OK;
/* Check the parameters */
@ -1119,6 +1124,8 @@ static HAL_StatusTypeDef FLASH_OB_EnableWRP(uint32_t WRPSector, uint32_t Banks)
*/
static HAL_StatusTypeDef FLASH_OB_DisableWRP(uint32_t WRPSector, uint32_t Banks)
{
(void)Banks;
HAL_StatusTypeDef status = HAL_OK;
/* Check the parameters */

View File

@ -454,7 +454,7 @@ void HAL_FLASH_IRQHandler(void)
__weak void HAL_FLASH_EndOfOperationCallback(uint32_t ReturnValue)
{
/* Prevent unused argument(s) compilation warning */
//UNUSED(ReturnValue);
(void)ReturnValue;
/* NOTE : This function Should not be modified, when the callback is needed,
the HAL_FLASH_EndOfOperationCallback could be implemented in the user file
*/
@ -472,7 +472,7 @@ __weak void HAL_FLASH_EndOfOperationCallback(uint32_t ReturnValue)
__weak void HAL_FLASH_OperationErrorCallback(uint32_t ReturnValue)
{
/* Prevent unused argument(s) compilation warning */
//UNUSED(ReturnValue);
(void)ReturnValue;
/* NOTE : This function Should not be modified, when the callback is needed,
the HAL_FLASH_OperationErrorCallback could be implemented in the user file
*/
@ -616,8 +616,9 @@ uint32_t HAL_FLASH_GetError(void)
* @retval HAL Status
*/
HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout)
{
uint32_t tickstart = 0;
{
(void)Timeout;
//uint32_t tickstart = 0;
/* Clear Error Code */
pFlash.ErrorCode = HAL_FLASH_ERROR_NONE;