Skip to content
Permalink
Browse files

Merge pull request #1247 from Allofich/warnings

Minor fixes
  • Loading branch information...
joncampbell123 committed Sep 14, 2019
2 parents 0a898eb + f9171c2 commit 10d7f4bd1c1b296285a3807773f4dfa96565466b
Showing with 13 additions and 20 deletions.
  1. +0 −4 configure.ac
  2. +1 −1 src/dos/dos_files.cpp
  3. +4 −7 src/dos/dos_programs.cpp
  4. +7 −7 src/dos/drive_fat.cpp
  5. +1 −1 src/libs/gui_tk/gui_tk.cpp
@@ -319,8 +319,6 @@ if test x$host = xi386-pc-os2-emx ; then
LDFLAGS="$LDFLAGS -Zomf -Zmt"
fi

AC_CHECK_CXXFLAGS([ -Wno-unknown-warning ])

dnl I would like to know of any concerns given by the C++ compiler.
dnl Clang/LLVM already does this to some degree, let's get GCC to do it too.
AC_CHECK_CXXFLAGS([ -Wall ])
@@ -350,8 +348,6 @@ dnl Clang/LLVM warning: don't care the address of a member may be unaligned, unl
AC_CHECK_CXXFLAGS([ -Wno-address-of-packed-member ])
dnl Clang/LLVM warning: don't care about int to void*, since void* is either same size or larger
AC_CHECK_CXXFLAGS([ -Wno-int-to-void-pointer-cast ])
dnl Clang/LLVM warning: extended field designator
AC_CHECK_CXXFLAGS([ -Wno-extended-offsetof ])

dnl Some stuff for the icon.
case "$host" in
@@ -1026,7 +1026,7 @@ static void SaveFindResult(DOS_FCB & find_fcb) {
else
DTAExtendName(name,file_name,ext);

DOS_FCB fcb(RealSeg(dos.dta()),RealOff(dos.dta()));//TODO
DOS_FCB fcb(RealSeg(dos.dta()),RealOff(dos.dta()));//TODO
fcb.Create(find_fcb.Extended());
fcb.SetName(drive,file_name,ext);
fcb.SetAttr(find_attr); /* Only adds attribute if fcb is extended */
@@ -80,8 +80,7 @@ void MOUSE::Run(void) {
WriteOut(MSG_Get("PROGRAM_MOUSE_HELP"));
return;
}
switch ((unsigned char)Mouse_Drv) { /* FIXME: Mouse_Drv is boolean, clang/llvm complains here */
case 0:
if (!Mouse_Drv) {
if (cmd->FindExist("/u",false))
WriteOut(MSG_Get("PROGRAM_MOUSE_NOINSTALLED"));
else {
@@ -96,8 +95,8 @@ void MOUSE::Run(void) {
}
mainMenu.get_item("dos_mouse_y_axis_reverse").check(Mouse_Vertical).refresh_item(mainMenu);
}
break;
case 1:
}
else {
if (cmd->FindExist("/u",false)) {
Mouse_Drv = false;
mainMenu.get_item("dos_mouse_enable_int33").check(Mouse_Drv).refresh_item(mainMenu);
@@ -114,9 +113,7 @@ void MOUSE::Run(void) {
mainMenu.get_item("dos_mouse_y_axis_reverse").check(Mouse_Vertical).refresh_item(mainMenu);
} else
WriteOut(MSG_Get("PROGRAM_MOUSE_ERROR"));
break;
}
return;
}
}

static void MOUSE_ProgramStart(Program * * make) {
@@ -551,7 +551,7 @@ void fatDrive::SetLabel(const char *label, bool /*iscdrom*/, bool /*updatable*/)

if (di == 0) {
memset(sectbuf,0,sizeof(sectbuf));
readSector(firstRootDirSect+(i/dirent_per_sector),sectbuf);
readSector((Bit32u)(firstRootDirSect+(i/dirent_per_sector)),sectbuf);
}

if (sectbuf[di].entryname[0] == 0x00 ||
@@ -564,7 +564,7 @@ void fatDrive::SetLabel(const char *label, bool /*iscdrom*/, bool /*updatable*/)
while (i < 11 && *s != 0) sectbuf[di].entryname[i++] = toupper(*s++);
while (i < 11) sectbuf[di].entryname[i++] = ' ';
}
writeSector(firstRootDirSect+(i/dirent_per_sector),sectbuf);
writeSector((Bit32u)(firstRootDirSect+(i/dirent_per_sector)),sectbuf);
labelCache.SetLabel(label, false, true);
UpdateBootVolumeLabel(label);
break;
@@ -578,7 +578,7 @@ void fatDrive::SetLabel(const char *label, bool /*iscdrom*/, bool /*updatable*/)

if (di == 0) {
memset(sectbuf,0,sizeof(sectbuf));
readSector(firstRootDirSect+(i/dirent_per_sector),sectbuf);
readSector((Bit32u)(firstRootDirSect+(i/dirent_per_sector)),sectbuf);
}

if (sectbuf[di].entryname[0] == 0x00 ||
@@ -591,7 +591,7 @@ void fatDrive::SetLabel(const char *label, bool /*iscdrom*/, bool /*updatable*/)
* of just picking the first one */
/* found one */
sectbuf[di].entryname[0] = 0xe5;
writeSector(firstRootDirSect+(i/dirent_per_sector),sectbuf);
writeSector((Bit32u)(firstRootDirSect+(i/dirent_per_sector)),sectbuf);
labelCache.SetLabel("", false, true);
UpdateBootVolumeLabel("NO NAME");
break;
@@ -1742,10 +1742,10 @@ bool fatDrive::FindNextInternal(Bit32u dirClustNumber, DOS_DTA &dta, direntry *f
if (sectbuf[entryoffset].attrib & DOS_ATTR_VOLUME)
trimString(find_name);

/* Compare attributes to search attributes */
/* Compare attributes to search attributes */

//TODO What about attrs = DOS_ATTR_VOLUME|DOS_ATTR_DIRECTORY ?
if (attrs == DOS_ATTR_VOLUME) {
//TODO What about attrs = DOS_ATTR_VOLUME|DOS_ATTR_DIRECTORY ?
if (attrs == DOS_ATTR_VOLUME) {
if (!(sectbuf[entryoffset].attrib & DOS_ATTR_VOLUME)) goto nextfile;
labelCache.SetLabel(find_name, false, true);
} else {
@@ -146,7 +146,7 @@ void Drawable::drawText(const String& text, bool interpret, Size start, Size len
c = font->toSpecial(text[start]);
} while (start < len && ((c >= '0' && c <= '9') || c == ';' || c == '['));
if (c == 'm' && start < len) {
if (font->toSpecial(text[seqstart++]) != '[') break; /* FIXME: Clang/LLVM claims this comparison will never happen */
if (text[seqstart++] != '[') break;
c = font->toSpecial(text[seqstart++]);
while (c != 'm') {
unsigned int param = 0;

0 comments on commit 10d7f4b

Please sign in to comment.
You can’t perform that action at this time.