Browse Source

Some more compiler warnings fixed.

adaptive-webui-19844
sledgehammer999 8 years ago
parent
commit
146d4e049a
  1. 2
      src/app/application.cpp
  2. 2
      src/base/bittorrent/session.cpp

2
src/app/application.cpp

@ -264,7 +264,7 @@ void Application::runExternalProgram(BitTorrent::TorrentHandle *const torrent) c
#elif defined(Q_OS_WIN) // test cmd: `echo "%F" > "c:\ab ba.txt"` #elif defined(Q_OS_WIN) // test cmd: `echo "%F" > "c:\ab ba.txt"`
program.prepend(QLatin1String("\"")).append(QLatin1String("\"")); program.prepend(QLatin1String("\"")).append(QLatin1String("\""));
program.prepend(Utils::Misc::windowsSystemPath() + QLatin1String("\\cmd.exe /C ")); program.prepend(Utils::Misc::windowsSystemPath() + QLatin1String("\\cmd.exe /C "));
const uint cmdMaxLength = 32768; // max length (incl. terminate char) for `lpCommandLine` in `CreateProcessW()` const int cmdMaxLength = 32768; // max length (incl. terminate char) for `lpCommandLine` in `CreateProcessW()`
if ((program.size() + 1) > cmdMaxLength) { if ((program.size() + 1) > cmdMaxLength) {
logger->addMessage(tr("Torrent: %1, run external program command too long (length > %2), execution failed.").arg(torrent->name()).arg(cmdMaxLength), Log::CRITICAL); logger->addMessage(tr("Torrent: %1, run external program command too long (length > %2), execution failed.").arg(torrent->name()).arg(cmdMaxLength), Log::CRITICAL);
return; return;

2
src/base/bittorrent/session.cpp

@ -1104,8 +1104,6 @@ void Session::adjustLimits(libt::session_settings &sessionSettings)
void Session::configure(libtorrent::session_settings &sessionSettings) void Session::configure(libtorrent::session_settings &sessionSettings)
{ {
Logger* const logger = Logger::instance();
const bool altSpeedLimitEnabled = isAltGlobalSpeedLimitEnabled(); const bool altSpeedLimitEnabled = isAltGlobalSpeedLimitEnabled();
sessionSettings.download_rate_limit = altSpeedLimitEnabled ? altGlobalDownloadSpeedLimit() : globalDownloadSpeedLimit(); sessionSettings.download_rate_limit = altSpeedLimitEnabled ? altGlobalDownloadSpeedLimit() : globalDownloadSpeedLimit();
sessionSettings.upload_rate_limit = altSpeedLimitEnabled ? altGlobalUploadSpeedLimit() : globalUploadSpeedLimit(); sessionSettings.upload_rate_limit = altSpeedLimitEnabled ? altGlobalUploadSpeedLimit() : globalUploadSpeedLimit();

Loading…
Cancel
Save