Commit dda47ef7 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by operator for beamline
Browse files

Remove compiler warnings

parent 02863490
Pipeline #25602 failed with stages
in 2 minutes and 16 seconds
......@@ -453,7 +453,7 @@ class Eiger : public Model
}
}
virtual void correctFrame(FrameType frame, void *ptr)
virtual void correctFrame(FrameType /*frame*/, void *ptr)
{
correctBorderCols(ptr);
correctBorderRows(ptr);
......
......@@ -162,7 +162,7 @@ class SipType
ConvertToCpp convertToCpp(PyObject *p, int *sipIsErr)
{ return ConvertToCpp(*this, p, sipIsErr); }
ConvertFromCpp convertFromCpp(T *c, bool is_new = true)
ConvertFromCpp convertFromCpp(T *c, bool /*is_new*/ = true)
{ return ConvertFromCpp(*this, c); }
private:
......
......@@ -1115,7 +1115,7 @@ void Camera::setNetworkParameter(NetworkParameter net_param, string& val)
THROW_HW_ERROR(NotSupported) << "Not implemented by slsDetector API";
}
void Camera::getNetworkParameter(NetworkParameter net_param, string& val)
void Camera::getNetworkParameter(NetworkParameter net_param, string& /*val*/)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(net_param);
......
......@@ -43,6 +43,7 @@ ostream& lima::SlsDetector::Defs::operator <<(ostream& os, TrigMode trig_mode)
case Gating: name = "Gating"; break;
case TriggeredGating: name = "TriggeredGating"; break;
case BurstTrigger: name = "BurstTrigger"; break;
case SoftTriggerExposure: name = "SoftTriggerExposure"; break;
}
return os << name;
}
......
......@@ -153,7 +153,7 @@ void Eiger::InterModGapCorr::prepareAcq()
}
}
void Eiger::InterModGapCorr::correctFrame(FrameType frame, void *ptr)
void Eiger::InterModGapCorr::correctFrame(FrameType /*frame*/, void *ptr)
{
DEB_MEMBER_FUNCT();
......@@ -203,7 +203,8 @@ Eiger::Geometry::Recv::FrameData::FrameData()
{
}
Eiger::Geometry::Recv::FrameData::FrameData(const RecvImageData& image, char *d)
Eiger::Geometry::Recv::FrameData::FrameData(const RecvImageData& /*image*/,
char *d)
: dst(d)
{
}
......@@ -407,7 +408,7 @@ void Eiger::Geometry::Recv::expandPixelDepth4(const FrameData& data)
const int gap_bits = ChipGap * 8;
const __m128i block64_bits128 = _mm_set_epi64x(0, 64);
const __m128i gap_bits128 = _mm_set_epi64x(0, gap_bits);
int shift_l;
int shift_l = 0;
__m128i shift_l128, shift_r128;
__m128i m64_0 = _mm_set_epi64x(0, -1);
__m128i m64_1 = _mm_set_epi64x(-1, 0);
......@@ -817,7 +818,7 @@ void Eiger::getADCInfo(NameList& name_list, IntList& idx_list,
#define EIGER_TEMP_FACTOR (1 / 1000.0)
#define EIGER_TEMP(x) {x, EIGER_TEMP_FACTOR}
#define EIGER_TEMP(x) {x, EIGER_TEMP_FACTOR, 0}
static struct ADCData {
ADCIndex idx;
......@@ -942,7 +943,7 @@ void Eiger::calcTimeRanges(PixelDepth pixel_depth, ClockDiv clock_div,
time_ranges.max_frame_period);
}
void Eiger::measureReadoutTime(double& readout_time)
void Eiger::measureReadoutTime(double& /*readout_time*/)
{
DEB_MEMBER_FUNCT();
......@@ -974,6 +975,7 @@ void Eiger::measureReadoutTime(double& readout_time)
DEB_ALWAYS() << "calling stopAcquisition";
cam->m_det->stopAcquisition();
readout_time = 0;
*/
}
......@@ -1336,7 +1338,8 @@ void Eiger::processOneFrame(AutoMutex& l)
void startFinish()
{
while (!in_proc.empty() && (*in_proc.begin() < frame))
while (!in_proc.empty()
&& (*in_proc.begin() < int(frame)))
eiger.wait();
}
......@@ -1363,7 +1366,7 @@ void Eiger::processOneFrame(AutoMutex& l)
m_recv_list[i]->processBadFrame(frame, bptr);
}
if ((m_last_frame == -1) || (frame > m_last_frame))
if ((int(m_last_frame) == -1) || (frame > m_last_frame))
m_last_frame = frame;
sync.startFinish();
......@@ -1453,7 +1456,7 @@ void Eiger::removeAllCorr()
delete *m_corr_list.rbegin();
}
double Eiger::getBorderCorrFactor(int det, int line)
double Eiger::getBorderCorrFactor(int /*det*/, int line)
{
DEB_MEMBER_FUNCT();
switch (line) {
......@@ -1467,7 +1470,7 @@ void Eiger::getFpgaFramePtrDiff(PtrDiffList& ptr_diff)
{
DEB_MEMBER_FUNCT();
Camera::BebList& beb_list = getCamera()->m_beb_list;
for (int i = 0; i != beb_list.size(); ++i) {
for (unsigned int i = 0; i != beb_list.size(); ++i) {
BebFpgaMem& fpga_mem = beb_list[i]->fpga_mem;
unsigned long wr_ptr = fpga_mem.read(BebFpgaWritePtrAddr);
unsigned long rd_ptr = fpga_mem.read(BebFpgaReadPtrAddr);
......
......@@ -71,7 +71,7 @@ FrameMap::Item::frameFinished(FrameType frame, bool no_check, bool valid)
int idx = f % m_map->m_buffer_size;
CounterList& cl = m_map->m_frame_item_count_list;
AtomicCounter& count = cl[idx];
double delay;
double delay = 0;
bool finished = count.dec_test_and_reset(nb_items, delay);
if (finished)
m_map->m_delay_stat.add(frame, delay);
......
......@@ -90,7 +90,7 @@ void test_expand_4(bool raw)
}
int main(int argc, char *argv[])
int main(int /*argc*/, char */*argv*/[])
{
DEB_GLOBAL_FUNCT();
......
......@@ -337,7 +337,9 @@ void test_slsdetector_control(string config_fname, bool enable_debug = false)
SlsDetectorAcq acq(config_fname);
DEB_ALWAYS() << "Done!";
system("mkdir -p data");
int ret = system("mkdir -p data");
if (ret != 0)
THROW_HW_ERROR(Error) << "Could not create data directory";
acq.initSaving("data", "img", ".edf", 0, CtSaving::EDF,
CtSaving::AutoFrame, 1, true);
......
......@@ -57,7 +57,7 @@ void test_stat(double slope, double offset, int n)
THROW_HW_ERROR(Error) << DEB_VAR2(r.offset, offset);
}
int main(int argc, char *argv[])
int main(int /*argc*/, char */*argv*/[])
{
DEB_GLOBAL_FUNCT();
......
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