mirror of
https://github.com/leozide/leocad.git
synced 2026-10-27 06:20:55 +00:00
Enable shadow warnings for non-MSVC builds
Enable -Wshadow to bring GCC and Clang shadowing diagnostics closer to the MSVC warning configuration. Rename the filename extension variable to avoid shadowing the file type extension, and remove the unused synthesized-piece failure counter. Validated with a macOS debug rebuild with no warnings or errors.
This commit is contained in:
1 parent
58f60b9423
commit
74e16b0d13
3 files changed
+3
-5
No files matched your search
@@ -1031,7 +1031,6 @@ void lcMainWindow::UpdateAssets()
|
||||
|
||||
int PendingParts = 0;
|
||||
int PendingSynths = 0;
|
||||
int FailedSynths = 0;
|
||||
int Failed = 0;
|
||||
QString FailureDetails;
|
||||
|
||||
@@ -1070,7 +1069,6 @@ void lcMainWindow::UpdateAssets()
|
||||
else if (!Piece->HasGeneratedMesh())
|
||||
{
|
||||
Failed++;
|
||||
FailedSynths++;
|
||||
|
||||
QString Error = lcGetPiecesLibrary()->GetSynthMeshError(Piece);
|
||||
|
||||
|
||||
+2
-2
@@ -1149,8 +1149,8 @@ bool Project::Load(const QString& FileName, bool ShowErrors)
|
||||
|
||||
while (!lcGetPiecesLibrary()->RenamePiece(Model->GetPieceInfo(), ModelName.toLatin1().constData()))
|
||||
{
|
||||
const QString Extension = FileInfo.suffix().isEmpty() ? QString() : QLatin1Char('.') + FileInfo.suffix();
|
||||
const QString NameSuffix = QLatin1Char(' ') + QString::number(Suffix++) + Extension;
|
||||
const QString FileExtension = FileInfo.suffix().isEmpty() ? QString() : QLatin1Char('.') + FileInfo.suffix();
|
||||
const QString NameSuffix = QLatin1Char(' ') + QString::number(Suffix++) + FileExtension;
|
||||
const int BaseLength = LC_PIECE_NAME_LEN - 1 - NameSuffix.length();
|
||||
ModelName = FileInfo.completeBaseName().left(BaseLength) + NameSuffix;
|
||||
}
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ win32-msvc* {
|
||||
} else {
|
||||
PRECOMPILED_HEADER = common/lc_global.h
|
||||
LIBS += -lz
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter -Wshadow
|
||||
QMAKE_CXXFLAGS += -Werror=unused-result
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user