Skip to content

Commit

Permalink
dos_programs.cpp: Silence some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
maron2000 committed Sep 29, 2023
1 parent b7dadc1 commit b4b9947
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/dos/dos_programs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ void DetachFromBios(imageDisk* image) {
}

void SwitchLanguage(int oldcp, int newcp, bool confirm) {
(void)oldcp; //unused
auto iterold = langcp_map.find(lastmsgcp), iternew = langcp_map.find(newcp);
std::string langold = iterold != langcp_map.end() ? iterold->second : "", langnew = iternew != langcp_map.end() ? iternew->second : "";
if (loadlang && langnew.size() && strcasecmp(langold.c_str(), langnew.c_str())) {
Expand Down Expand Up @@ -5921,7 +5922,7 @@ class IMGMOUNT : public Program {
return NULL;
}
QCow2Image::QCow2Header qcow2_header = QCow2Image::read_header(newDisk);
uint64_t sectors;
// uint64_t sectors; /* unused */
uint32_t imagesize;
sizes[0] = 512; // default sector size
if(qcow2_header.magic == QCow2Image::magic && (qcow2_header.version == 2 || qcow2_header.version == 3)) {
Expand All @@ -5930,8 +5931,8 @@ class IMGMOUNT : public Program {
WriteOut("Sector size must be larger than 512 bytes and evenly divide the image cluster size of %lu bytes.\n", cluster_size);
return 0;
}
sectors = (uint64_t)qcow2_header.size / (uint64_t)sizes[0]; //sectors
imagesize = (uint32_t)(qcow2_header.size / 1024L); // imagesize
// sectors = (uint64_t)qcow2_header.size / (uint64_t)sizes[0]; /* unused */
imagesize = (uint32_t)(qcow2_header.size / 1024L);
sizes[1] = 63; // sectors
sizes[2] = 16; // heads
sizes[3] = (uint64_t)qcow2_header.size / sizes[0] / sizes[1] / sizes[2]; // cylinders
Expand Down Expand Up @@ -7300,7 +7301,7 @@ void UTF8::Run()
WriteOut("No input text found.\n");
return;
}
int cp=dos.loaded_codepage;
// int cp=dos.loaded_codepage; /* unused */
char target[11] = "CP437";
if (dos.loaded_codepage==808) strcpy(target, "CP866");
else if (dos.loaded_codepage==859) strcpy(target, "CP858");
Expand Down Expand Up @@ -7837,7 +7838,7 @@ uint64_t VHDMAKE::ssizetou64(const char* s_size) {
void VHDMAKE::Run()
{
bool bOverwrite = false;
bool bExists = false;
// bool bExists = false; /* unused */
uint32_t ret;
char basename[256], filename[256];

Expand Down Expand Up @@ -7876,7 +7877,7 @@ void VHDMAKE::Run()
imageDiskVHD::VHDInfo* p = info->parentInfo;
while(p != NULL) {
index++;
for(int i = 0; i < index; i++) WriteOut(" ");
for(uint32_t i = 0; i < index; i++) WriteOut(" ");
WriteOut("child of \"%s\" (%s)", p->diskname.c_str(), vhdTypes[(int)p->vhdType]);
if (p->vhdType != imageDiskVHD::VHD_TYPE_FIXED)
WriteOut(MSG_Get("PROGRAM_VHDMAKE_BLOCKSTATS"), p->allocatedBlocks, p->totalBlocks);
Expand Down

0 comments on commit b4b9947

Please sign in to comment.