From 0790749917499485fa4726e8223c6445846bfc56 Mon Sep 17 00:00:00 2001 From: michaelangel007 Date: Thu, 6 Apr 2023 13:44:30 -0700 Subject: [PATCH] Fix cast warnings --- prodos.cpp | 2 +- prodos.tools.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/prodos.cpp b/prodos.cpp index f572505..9561292 100644 --- a/prodos.cpp +++ b/prodos.cpp @@ -464,7 +464,7 @@ bool doCopy( ProDOS_FileHeader_t *entry, const char *filename ) if( !bCopiedName ) { - gEntry.len = string_CopyUpper( gEntry.name, pSrcFileName ); + gEntry.len = (uint8_t) string_CopyUpper( gEntry.name, pSrcFileName ); } #if DEBUG_MAIN diff --git a/prodos.tools.cpp b/prodos.tools.cpp index 4fa6161..c5dc73f 100644 --- a/prodos.tools.cpp +++ b/prodos.tools.cpp @@ -495,7 +495,7 @@ int prodos_FindFile( ProDOS_VolumeHeader_t *volume, const char *path, int base = // Get path head int iDirName = nPathLen; char sDirName[16]; - int i; + size_t i; // Split path for( i = 0; i < nPathLen; i++ ) @@ -1436,7 +1436,7 @@ void ProDOS_Init( const char *path ) int iOffset; // Init Bitmap - gVolume.meta.bitmap_block = PRODOS_ROOT_BLOCK + nRootDirBlocks; + gVolume.meta.bitmap_block = (uint16_t) (PRODOS_ROOT_BLOCK + nRootDirBlocks); int nBitmapBlocks = prodos_BlockInitFree( &gVolume ); // Set boot blocks as in-use @@ -1490,7 +1490,7 @@ void ProDOS_Init( const char *path ) #endif gVolume.entry_len = 0x27; - gVolume.entry_num = PRODOS_BLOCK_SIZE / gVolume.entry_len; + gVolume.entry_num = (uint8_t) (PRODOS_BLOCK_SIZE / gVolume.entry_len); // Note: // .file_count = 0, since no files added @@ -1501,7 +1501,7 @@ void ProDOS_Init( const char *path ) size_t nLen = strlen( path ); gVolume.kind = ProDOS_KIND_ROOT; - gVolume.len = nLen; + gVolume.len = (uint8_t) nLen; string_CopyUpper( gVolume.name, path, 15 ); gVolume.access = 0