diff --git a/setter/src/dos/attr.c b/setter/src/dos/attr.c index f99d2da..3a25eff 100644 --- a/setter/src/dos/attr.c +++ b/setter/src/dos/attr.c @@ -47,7 +47,8 @@ void FileAttributes(const char* path) { char driveNo = path[0] - '@'; unsigned total, actionTaken; - int rc, wRc, cRc, handle; + unsigned int rc, wRc, cRc; + int handle; int i; if(driveNo > 32) driveNo -= 32; diff --git a/setter/src/dos/deleted.c b/setter/src/dos/deleted.c index e932dae..7e3555c 100644 --- a/setter/src/dos/deleted.c +++ b/setter/src/dos/deleted.c @@ -45,9 +45,9 @@ Copyright (C) 2011-2021 Natalia Portillo void DeleteFiles(const char* path) { char driveNo = path[0] - '@'; - int rc = 0; + unsigned int rc; char filename[9]; - short pos = 0; + short pos; unsigned total; int handle; @@ -64,7 +64,7 @@ void DeleteFiles(const char* path) return; } - rc = chdir("DELETED"); + chdir("DELETED"); printf("Creating and deleting files.\n"); diff --git a/setter/src/dos/dirdepth.c b/setter/src/dos/dirdepth.c index 0e780d5..1c75d75 100644 --- a/setter/src/dos/dirdepth.c +++ b/setter/src/dos/dirdepth.c @@ -46,7 +46,7 @@ Copyright (C) 2011-2021 Natalia Portillo void DirectoryDepth(const char* path) { char driveNo = path[0] - '@'; - int rc = 0; + unsigned int rc ; unsigned total; char filename[9]; long pos = 2; diff --git a/setter/src/dos/filename.c b/setter/src/dos/filename.c index c70512e..21cfe01 100644 --- a/setter/src/dos/filename.c +++ b/setter/src/dos/filename.c @@ -46,7 +46,7 @@ Copyright (C) 2011-2021 Natalia Portillo void Filenames(const char* path) { char driveNo = path[0] - '@'; - int rc = 0, wRc = 0, cRc = 0; + unsigned int rc, wRc = 0, cRc = 0; unsigned actionTaken, total; int handle; char message[300]; @@ -65,7 +65,7 @@ void Filenames(const char* path) return; } - rc = chdir("FILENAME"); + chdir("FILENAME"); printf("Creating files with different filenames.\n"); diff --git a/setter/src/dos/files.c b/setter/src/dos/files.c index ff7cd72..c5a210e 100644 --- a/setter/src/dos/files.c +++ b/setter/src/dos/files.c @@ -45,7 +45,7 @@ Copyright (C) 2011-2021 Natalia Portillo void MillionFiles(const char* path) { char driveNo = path[0] - '@'; - int rc = 0; + unsigned int rc; char filename[9]; unsigned long pos = 0; int handle; @@ -64,7 +64,7 @@ void MillionFiles(const char* path) return; } - rc = chdir("MILLION"); + chdir("MILLION"); printf("Creating lots of files.\n"); diff --git a/setter/src/dos/frag.c b/setter/src/dos/frag.c index ed908ca..67e8f5d 100644 --- a/setter/src/dos/frag.c +++ b/setter/src/dos/frag.c @@ -47,14 +47,14 @@ Copyright (C) 2011-2021 Natalia Portillo void Fragmentation(const char* path, size_t clusterSize) { - size_t halfCluster = clusterSize / 2; - size_t quarterCluster = clusterSize / 4; - size_t twoCluster = clusterSize * 2; - size_t threeQuartersCluster = halfCluster + quarterCluster; - size_t twoAndThreeQuartCluster = threeQuartersCluster + twoCluster; + unsigned int halfCluster = clusterSize / 2; + unsigned int quarterCluster = clusterSize / 4; + unsigned int twoCluster = clusterSize * 2; + unsigned int threeQuartersCluster = halfCluster + quarterCluster; + unsigned int twoAndThreeQuartCluster = threeQuartersCluster + twoCluster; unsigned char* buffer; char driveNo = path[0] - '@'; - int rc = 0, wRc = 0, cRc = 0; + unsigned int rc, wRc = 0, cRc = 0; unsigned total, actionTaken = 0; int handle; long i; @@ -72,7 +72,7 @@ void Fragmentation(const char* path, size_t clusterSize) return; } - rc = chdir("FRAGS"); + chdir("FRAGS"); rc = _dos_creatnew("HALFCLST", _A_NORMAL, &handle); if(!rc) @@ -221,7 +221,7 @@ void Fragmentation(const char* path, size_t clusterSize) } printf("\tDeleting \"TWO1\".\n"); - rc = unlink("TWO1"); + unlink("TWO1"); printf("\tDeleting \"TWO3\".\n"); rc = unlink("TWO3"); diff --git a/setter/src/dos/time.c b/setter/src/dos/time.c index 1ebe243..7433471 100644 --- a/setter/src/dos/time.c +++ b/setter/src/dos/time.c @@ -47,7 +47,7 @@ Copyright (C) 2011-2021 Natalia Portillo void Timestamps(const char* path) { char driveNo = path[0] - '@'; - int rc = 0, wRc = 0, cRc = 0, tRc = 0; + unsigned int rc, wRc = 0, cRc = 0, tRc = 0; unsigned actionTaken, total; int handle; char message[300]; diff --git a/setter/src/dos/volume.c b/setter/src/dos/volume.c index 638a4cf..ba97124 100644 --- a/setter/src/dos/volume.c +++ b/setter/src/dos/volume.c @@ -43,20 +43,20 @@ void GetVolumeInfo(const char* path, size_t* clusterSize) char driveNo = path[0] - '@'; struct diskfree_t oldFreeSpace; struct diskfree_ex_t freeSpace; - unsigned int ret; + unsigned int rc; memset(&oldFreeSpace, 0, sizeof(struct diskfree_t)); memset(&freeSpace, 0, sizeof(struct diskfree_ex_t)); if(driveNo > 32) driveNo -= 32; - ret = _dos_getdiskfree_ex(driveNo, &freeSpace); + rc = _dos_getdiskfree_ex(driveNo, &freeSpace); - if(ret) + if(rc) { if(errno == ENOSYS) { - ret = _dos_getdiskfree(driveNo, &oldFreeSpace); + rc = _dos_getdiskfree(driveNo, &oldFreeSpace); freeSpace.sectorsPerCluster = oldFreeSpace.sectors_per_cluster; freeSpace.freeClusters = oldFreeSpace.avail_clusters; freeSpace.bytesPerSector = oldFreeSpace.bytes_per_sector; @@ -69,7 +69,7 @@ void GetVolumeInfo(const char* path, size_t* clusterSize) } } - if(ret == 0) + if(rc == 0) { printf("\tBytes per sector: %lu\n", freeSpace.bytesPerSector); printf("\tSectors per cluster: %lu (%lu bytes)\n",