@@ -388,7 +388,7 @@ int mountOrFormatSDCard(const enum FileSystems fileSystem,
388
388
}
389
389
// <--
390
390
391
- int mountOrFormatReturn = mountOrFormatFileSystemOnDevice (DEV_SDCARD, &sdcard, fileSystem, " sdcard" , mountOrFormat);
391
+ const int mountOrFormatReturn = mountOrFormatFileSystemOnDevice (DEV_SDCARD, &sdcard, fileSystem, " sdcard" , mountOrFormat);
392
392
if (0 != mountOrFormatReturn)
393
393
{
394
394
delete sdcard.device ;
@@ -453,7 +453,7 @@ int mountOrFormatUSBDevice(const enum FileSystems fileSystem,
453
453
return ENOTBLK;
454
454
}
455
455
}
456
- int mountOrFormatReturn = mountOrFormatFileSystemOnDevice (DEV_USB, &usb, fileSystem, " usb" , mountOrFormat);
456
+ const int mountOrFormatReturn = mountOrFormatFileSystemOnDevice (DEV_USB, &usb, fileSystem, " usb" , mountOrFormat);
457
457
if (0 != mountOrFormatReturn)
458
458
{
459
459
// Only delete if the object was created by this function
@@ -510,7 +510,7 @@ int mount(const enum DeviceNames deviceName,
510
510
errno = ENOTSUP;
511
511
return -1 ;
512
512
}
513
- int mountOrFormatReturn = mountOrFormat (deviceName, fileSystem, ACTION_MOUNT);
513
+ const int mountOrFormatReturn = mountOrFormat (deviceName, fileSystem, ACTION_MOUNT);
514
514
if (0 != mountOrFormatReturn)
515
515
{
516
516
errno = mountOrFormatReturn;
@@ -521,7 +521,7 @@ int mount(const enum DeviceNames deviceName,
521
521
522
522
int mkfs (const enum DeviceNames deviceName, const enum FileSystems fileSystem)
523
523
{
524
- int mountOrFormatReturn = mountOrFormat (deviceName, fileSystem, ACTION_FORMAT);
524
+ const int mountOrFormatReturn = mountOrFormat (deviceName, fileSystem, ACTION_FORMAT);
525
525
if (0 != mountOrFormatReturn)
526
526
{
527
527
errno = mountOrFormatReturn;
@@ -532,7 +532,7 @@ int mkfs(const enum DeviceNames deviceName, const enum FileSystems fileSystem)
532
532
533
533
int umount (const enum DeviceNames deviceName)
534
534
{
535
- struct DeviceFileSystemCombination *deviceFileSystemCombination;
535
+ struct DeviceFileSystemCombination *deviceFileSystemCombination = nullptr ;
536
536
537
537
switch (deviceName)
538
538
{
0 commit comments