Commit c1d5cf2c authored by Paal Kvamme's avatar Paal Kvamme
Browse files

Warning reduction.

parent 93d7e6e8
Pipeline #24602 passed with stages
in 5 minutes and 10 seconds
......@@ -1705,7 +1705,7 @@ ZgyInternalBulk::_writeAlignedRegion(
normal_queue[ix] = now;
}
}
catch (const std::exception& ex)
catch (const std::exception&)
{
// No effort to log the actual error or to get the loop to
// end earlier. An exception here really shouldn't happen.
......
......@@ -144,7 +144,7 @@ FileWithPerformanceLogger::add(const Timer& timer, std::int64_t blocksize)
const double fbin = (value - _histmin) / binwidth;
const int ibin = (fbin < 0 ? 0 :
fbin > (nbuckets-1) ? nbuckets-1 :
std::floor(fbin+0.5));
static_cast<int>(std::floor(fbin+0.5)));
_histbins[ibin] += 1;
_nsamples += 1;
_statsum += value;
......@@ -230,7 +230,7 @@ FileWithPerformanceLogger::dumpThroughput(bool clear)
std::lock_guard<std::mutex> lk(_mutex);
std::stringstream ss;
if (_sumtimerbeg < _sumtimerend && _sumbytes > 0) {
const double bytecount = _sumbytes;
const double bytecount = static_cast<double>(_sumbytes);
const double elapsed = _sumtimerend - _sumtimerbeg;
// Note, if you want to emulate an interval timer running
// regardless of whether there was any traffic then round
......
......@@ -97,7 +97,7 @@ public:
static void getValue_s(char *buf, int len, const char *name, int count, double total, double adjusted, bool running, bool details, bool msonly);
const char* getValue(bool details = false, bool msonly = false);
// Shouldn't be public but might come in handy if extending Timer.
double getLastStop() const { return end_; }
double getLastStop() const { return static_cast<double>(end_); }
// OPERATIONS
void setVerbose(int v) { verbose_ = v; }
......
......@@ -43,6 +43,7 @@ namespace {
}
#endif
#ifdef HAVE_SD
/**
* Convenience to hard code credentials for testing. Returns an IOContext.
* Picking up sdurl/sdapikey from the environment is redundant since
......@@ -57,6 +58,7 @@ SeismicStoreIOContext getContext()
Environment::getStringEnv("OPENZGY_TOKEN") :
"FILE:carbon.slbapp.com", "");
}
#endif
void deleteFile(const std::shared_ptr<FileADT>& file, const std::string& filename)
{
......@@ -137,10 +139,10 @@ test_localfilefactory()
});
}
#ifdef HAVE_SD
void
test_sdfilefactory()
{
#ifdef HAVE_SD
SeismicStoreIOContext context = getContext();
// TODO-Low, this CloudFileAutoDelete doesn't actually clean up.
// Hopefully the test or the cleanup task will handle it.
......@@ -151,8 +153,8 @@ test_sdfilefactory()
name, mode, &context);
});
cad.disarm();
#endif
}
#endif
/**
* Python one-liner to show the expiry time of the OPENZGY_TOKEN
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment