Skip to content

Commit

Permalink
Fix codechecker errors
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrohr committed Feb 11, 2021
1 parent 4f849b1 commit 8bd0dc0
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
Expand Up @@ -131,15 +131,16 @@ class ConstMCTruthContainerView
public:
ConstMCTruthContainerView(gsl::span<const char> const bufferview) : mStorage(bufferview){};
ConstMCTruthContainerView(ConstMCTruthContainer<TruthElement> const& cont) : mStorage(gsl::span<const char>(cont)){};
// be explicit that we want nullptr / 0 for an uninitialized container (needs (void)0 to avoid false codechecker warning)
#ifdef MS_GSL_V3
// be explicit that we want nullptr / 0 for an uninitialized container
ConstMCTruthContainerView() : mStorage{nullptr, static_cast<gsl::span<const char>::size_type>(0)}
{
(void)0;
}
#else
// be explicit that we want nullptr / 0 for an uninitialized container
ConstMCTruthContainerView() : mStorage{nullptr, static_cast<gsl::span<const char>::index_type>(0)}
{
(void)0;
}
#endif
ConstMCTruthContainerView(const ConstMCTruthContainerView&) = default;
Expand Down
4 changes: 2 additions & 2 deletions GPU/GPUTracking/Benchmark/standalone.cxx
Expand Up @@ -35,11 +35,11 @@
#ifndef _WIN32
#include <unistd.h>
#include <sched.h>
#include <signal.h>
#include <csignal>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/select.h>
#include <fenv.h>
#include <cfenv>
#include <clocale>
#include <sys/stat.h>
#endif
Expand Down
4 changes: 2 additions & 2 deletions GPU/GPUTracking/display/GPUDisplayBackendGlut.cxx
Expand Up @@ -26,13 +26,13 @@
using namespace GPUCA_NAMESPACE::gpu;
static GPUDisplayBackendGlut* me = nullptr;

void GPUDisplayBackendGlut::displayFunc(void)
void GPUDisplayBackendGlut::displayFunc()
{
me->DrawGLScene();
glutSwapBuffers();
}

void GPUDisplayBackendGlut::glutLoopFunc(void)
void GPUDisplayBackendGlut::glutLoopFunc()
{
me->HandleSendKey();
displayFunc();
Expand Down
4 changes: 2 additions & 2 deletions GPU/GPUTracking/display/GPUDisplayBackendGlut.h
Expand Up @@ -35,8 +35,8 @@ class GPUDisplayBackendGlut : public GPUDisplayBackend
private:
int OpenGLMain() override;

static void displayFunc(void);
static void glutLoopFunc(void);
static void displayFunc();
static void glutLoopFunc();
static void keyboardUpFunc(unsigned char key, int x, int y);
static void keyboardDownFunc(unsigned char key, int x, int y);
static void specialUpFunc(int key, int x, int y);
Expand Down
2 changes: 1 addition & 1 deletion GPU/GPUTracking/qa/genEvents.cxx
Expand Up @@ -13,7 +13,7 @@

#include <iostream>
#include <fstream>
#include <string.h>
#include <cstring>
#include <sys/stat.h>

#include "Rtypes.h"
Expand Down
2 changes: 1 addition & 1 deletion GPU/GPUTracking/qa/genEvents.h
Expand Up @@ -54,7 +54,7 @@ class genEvents
int RecalculateSlice(GPUTPCGMPhysicalTrackModel& t, int& iSlice);
double GetGaus(double sigma);

TH1F* mClusterError[3][2] = {{0, 0}, {0, 0}, {0, 0}};
TH1F* mClusterError[3][2] = {{nullptr, nullptr}, {nullptr, nullptr}, {nullptr, nullptr}};

struct GenCluster {
int sector;
Expand Down

0 comments on commit 8bd0dc0

Please sign in to comment.