Skip to content
Extraits de code Groupes Projets
Vérifiée Valider b11814ea rédigé par Kubat's avatar Kubat
Parcourir les fichiers

BUILD: Fix gcc warnings

parent cc037f16
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -25,6 +25,7 @@ set(STL_INC ...@@ -25,6 +25,7 @@ set(STL_INC
<mutex> <mutex>
<iomanip> <iomanip>
<filesystem> <filesystem>
<bit>
) )
set(EXT_INC PRIVATE set(EXT_INC PRIVATE
......
...@@ -142,7 +142,7 @@ LogMessage::LogMessage(LogMessage &&other) noexcept ...@@ -142,7 +142,7 @@ LogMessage::LogMessage(LogMessage &&other) noexcept
, parentLogger(other.parentLogger) , parentLogger(other.parentLogger)
{ {
std::memcpy(this, &other, sizeof(LogMessage)); std::memcpy(this, &other, sizeof(LogMessage));
std::memset(&other, 0, sizeof(LogMessage)); std::memset(reinterpret_cast<void *>(&other), 0, sizeof(LogMessage));
} }
LogMessage && LogMessage &&
......
...@@ -33,6 +33,7 @@ VivyApplication::setTheme(Theme theme) noexcept ...@@ -33,6 +33,7 @@ VivyApplication::setTheme(Theme theme) noexcept
QFile stylesheet(sheet); QFile stylesheet(sheet);
if (!stylesheet.exists()) { if (!stylesheet.exists()) {
logFatal() << "Missing stylesheet!"; logFatal() << "Missing stylesheet!";
exit(EXIT_FAILURE);
} else { } else {
stylesheet.open(QFile::ReadOnly | QFile::Text); stylesheet.open(QFile::ReadOnly | QFile::Text);
QTextStream stylesheetStream(&stylesheet); QTextStream stylesheetStream(&stylesheet);
...@@ -92,6 +93,9 @@ VivyApplication::exec() noexcept ...@@ -92,6 +93,9 @@ VivyApplication::exec() noexcept
return QApplication::exec(); return QApplication::exec();
} }
} }
logFatal() << "Unreachable: undefined ApplicationType";
return 1;
} }
QFont QFont
...@@ -111,7 +115,8 @@ VivyApplication::getApplicationFont(Font id) const noexcept ...@@ -111,7 +115,8 @@ VivyApplication::getApplicationFont(Font id) const noexcept
} }
// Let the program crash // Let the program crash
logFatal() << "Unreachable"; logError() << "Unreachable: undefined font id";
return getFontFromId(fontIdRegular);
} }
MainWindow * MainWindow *
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter