Skip to content

Commit 12fba34

Browse files
authored
fix warning / errors from GCC 16 (#11652)
1 parent 7514548 commit 12fba34

6 files changed

Lines changed: 7 additions & 24 deletions

File tree

lib/main/STM32F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_ll_usb.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,6 @@ HAL_StatusTypeDef USB_ActivateEndpoint(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTy
506506
*/
507507
HAL_StatusTypeDef USB_ActivateDedicatedEndpoint(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep)
508508
{
509-
static __IO uint32_t debug = 0;
510-
511509
/* Read DEPCTLn register */
512510
if (ep->is_in == 1)
513511
{
@@ -517,10 +515,6 @@ HAL_StatusTypeDef USB_ActivateDedicatedEndpoint(USB_OTG_GlobalTypeDef *USBx, USB
517515
((ep->num) << 22 ) | (USB_OTG_DIEPCTL_SD0PID_SEVNFRM) | (USB_OTG_DIEPCTL_USBAEP));
518516
}
519517

520-
521-
debug |= ((ep->maxpacket & USB_OTG_DIEPCTL_MPSIZ ) | (ep->type << 18 ) |\
522-
((ep->num) << 22 ) | (USB_OTG_DIEPCTL_SD0PID_SEVNFRM) | (USB_OTG_DIEPCTL_USBAEP));
523-
524518
USBx_DEVICE->DEACHMSK |= USB_OTG_DAINTMSK_IEPM & ((1 << (ep->num)));
525519
}
526520
else
@@ -529,11 +523,6 @@ HAL_StatusTypeDef USB_ActivateDedicatedEndpoint(USB_OTG_GlobalTypeDef *USBx, USB
529523
{
530524
USBx_OUTEP(ep->num)->DOEPCTL |= ((ep->maxpacket & USB_OTG_DOEPCTL_MPSIZ ) | (ep->type << 18 ) |\
531525
((ep->num) << 22 ) | (USB_OTG_DOEPCTL_USBAEP));
532-
533-
debug = (uint32_t)(((uint32_t )USBx) + USB_OTG_OUT_ENDPOINT_BASE + (0)*USB_OTG_EP_REG_SIZE);
534-
debug = (uint32_t )&USBx_OUTEP(ep->num)->DOEPCTL;
535-
debug |= ((ep->maxpacket & USB_OTG_DOEPCTL_MPSIZ ) | (ep->type << 18 ) |\
536-
((ep->num) << 22 ) | (USB_OTG_DOEPCTL_USBAEP));
537526
}
538527

539528
USBx_DEVICE->DEACHMSK |= USB_OTG_DAINTMSK_OEPM & ((1 << (ep->num)) << 16);

src/main/io/serial_4way_avrootloader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ uint8_t BL_ConnectEx(uint8_32_u *pDeviceInfo)
195195

196196
//DeviceInfo.dword=0; is set before
197197
uint8_t BootInfo[9];
198-
uint8_t BootMsg[BootMsgLen-1] = "471";
198+
uint8_t BootMsg[BootMsgLen-1] = {'4','7','1'};
199199
// x * 0 + 9
200200
#if defined(USE_SERIAL_4WAY_SK_BOOTLOADER)
201201
uint8_t BootInit[] = {0,0,0,0,0,0,0,0,0,0,0,0,0x0D,'B','L','H','e','l','i',0xF4,0x7D};

src/main/rx/fport.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ static serialPort_t *fportPort;
149149

150150
static void reportFrameError(uint8_t errorReason) {
151151
UNUSED(errorReason);
152-
static volatile uint16_t frameErrors = 0;
153-
frameErrors++;
154152
}
155153

156154
// Receive ISR callback

src/main/target/SITL/sim/xplane.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ typedef enum
169169
DREF_XITL_BATTERY_CURRENT,
170170
DREF_XITL_RSSI,
171171
DREF_XITL_FAILSAFE,
172-
172+
173173
DREF_LAST
174174
} dref_t;
175175

@@ -560,8 +560,8 @@ static void exchangeDataWithXPlane(void)
560560
}
561561

562562
gpsFakeSet(
563-
fixType,
564-
numSats,
563+
fixType,
564+
numSats,
565565
(int32_t)roundf(lattitude * 10000000),
566566
(int32_t)roundf(longitude * 10000000),
567567
(int32_t)roundf(elevation * 100),
@@ -687,7 +687,7 @@ static void* listenWorker(void* arg)
687687
// calibration of the accelerometer
688688
ENABLE_STATE(ACCELEROMETER_CALIBRATED);
689689
connectionState = CONNECTED;
690-
690+
691691
break;
692692
}
693693
case CONNECTED:

src/main/telemetry/hott.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ void hottPrepareGPSResponse(HOTT_GPS_MSG_t *hottGPSMessage)
236236

237237
#ifdef USE_GPS_FIX_ESTIMATION
238238
if (!(STATE(GPS_FIX) || STATE(GPS_ESTIMATED_FIX)))
239-
#else
239+
#else
240240
if (!(STATE(GPS_FIX)))
241241
#endif
242242
{
@@ -339,8 +339,6 @@ void hottPrepareEAMResponse(HOTT_EAM_MSG_t *hottEAMMessage)
339339

340340
static void hottSerialWrite(uint8_t c)
341341
{
342-
static uint8_t serialWrites = 0;
343-
serialWrites++;
344342
serialWrite(hottPort, c);
345343
}
346344

src/main/telemetry/jetiexbus.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ int32_t getSensorValue(uint8_t sensor)
447447

448448
case EX_TRIP_DISTANCE:
449449
return getTotalTravelDistance() / 10;
450-
450+
451451
case EX_DEBUG0:
452452
return debug[0];
453453
case EX_DEBUG1:
@@ -548,7 +548,6 @@ void checkJetiExBusTelemetryState(void)
548548

549549
void NOINLINE handleJetiExBusTelemetry(void)
550550
{
551-
static uint16_t framesLost = 0; // only for debug
552551
static uint8_t item = 0;
553552
uint32_t timeDiff;
554553

@@ -564,7 +563,6 @@ void NOINLINE handleJetiExBusTelemetry(void)
564563

565564
if (timeDiff > 3000) { // include reserved time
566565
jetiExBusRequestState = EXBUS_STATE_ZERO;
567-
framesLost++;
568566
return;
569567
}
570568

0 commit comments

Comments
 (0)