@@ -388,7 +388,7 @@ int mountOrFormatSDCard(const enum FileSystems fileSystem,
388388 }
389389 // <--
390390
391- int mountOrFormatReturn = mountOrFormatFileSystemOnDevice (DEV_SDCARD, &sdcard, fileSystem, " sdcard" , mountOrFormat);
391+ const int mountOrFormatReturn = mountOrFormatFileSystemOnDevice (DEV_SDCARD, &sdcard, fileSystem, " sdcard" , mountOrFormat);
392392 if (0 != mountOrFormatReturn)
393393 {
394394 delete sdcard.device ;
@@ -453,7 +453,7 @@ int mountOrFormatUSBDevice(const enum FileSystems fileSystem,
453453 return ENOTBLK;
454454 }
455455 }
456- int mountOrFormatReturn = mountOrFormatFileSystemOnDevice (DEV_USB, &usb, fileSystem, " usb" , mountOrFormat);
456+ const int mountOrFormatReturn = mountOrFormatFileSystemOnDevice (DEV_USB, &usb, fileSystem, " usb" , mountOrFormat);
457457 if (0 != mountOrFormatReturn)
458458 {
459459 // Only delete if the object was created by this function
@@ -510,7 +510,7 @@ int mount(const enum DeviceNames deviceName,
510510 errno = ENOTSUP;
511511 return -1 ;
512512 }
513- int mountOrFormatReturn = mountOrFormat (deviceName, fileSystem, ACTION_MOUNT);
513+ const int mountOrFormatReturn = mountOrFormat (deviceName, fileSystem, ACTION_MOUNT);
514514 if (0 != mountOrFormatReturn)
515515 {
516516 errno = mountOrFormatReturn;
@@ -521,7 +521,7 @@ int mount(const enum DeviceNames deviceName,
521521
522522int mkfs (const enum DeviceNames deviceName, const enum FileSystems fileSystem)
523523{
524- int mountOrFormatReturn = mountOrFormat (deviceName, fileSystem, ACTION_FORMAT);
524+ const int mountOrFormatReturn = mountOrFormat (deviceName, fileSystem, ACTION_FORMAT);
525525 if (0 != mountOrFormatReturn)
526526 {
527527 errno = mountOrFormatReturn;
@@ -532,7 +532,7 @@ int mkfs(const enum DeviceNames deviceName, const enum FileSystems fileSystem)
532532
533533int umount (const enum DeviceNames deviceName)
534534{
535- struct DeviceFileSystemCombination *deviceFileSystemCombination;
535+ struct DeviceFileSystemCombination *deviceFileSystemCombination = nullptr ;
536536
537537 switch (deviceName)
538538 {
0 commit comments