fix for checkCudaErrors

This commit is contained in:
jojo61 2019-01-04 09:21:47 +01:00
parent 24f679e1d3
commit 003d06b946
3 changed files with 7 additions and 6 deletions

View File

@ -441,7 +441,7 @@ s_CudaErrorStr sCudaDrvErrorString[] =
// This is just a linear search through the array, since the error_id's are not
// always ocurring consecutively
inline const char *getCudaDrvErrorString(CUresult error_id)
static inline const char *getCudaDrvErrorString(CUresult error_id)
{
int index = 0;

View File

@ -1444,7 +1444,7 @@ int cOglThread::StoreImage(const cImage &image) {
tColor *argb = MALLOC(tColor, imgSize);
if (!argb) {
esyslog("[softhddev]memory allocation of %d kb for OSD image failed", imgSize * sizeof(tColor) / 1024);
esyslog("[softhddev]memory allocation of %ld kb for OSD image failed", (imgSize * sizeof(tColor)) / 1024);
ClearSlot(slot);
slot = 0;
return 0;
@ -1604,6 +1604,7 @@ bool cOglThread::InitOpenGL(void) {
buffer[0] = strdup("openglosd");
buffer[1] = strdup("-display");
buffer[2] = strdup(displayName);
char **argv = buffer;
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGBA | GLUT_ALPHA);
@ -1614,7 +1615,7 @@ bool cOglThread::InitOpenGL(void) {
free(buffer[0]);
free(buffer[1]);
free(buffer[2]);
GLenum err = glewInit();
if( err != GLEW_OK) {
esyslog("[softhddev]glewInit failed, aborting\n");
@ -2040,7 +2041,7 @@ void cOglOsd::Flush(void) {
//clear buffer
//uint64_t start = cTimeMs::Now();
//dsyslog("[softhddev]Start Flush at %" PRIu64 "", cTimeMs::Now());
oglThread->DoCmd(new cOglCmdFill(bFb, clrTransparent));

View File

@ -1803,7 +1803,7 @@ int CuvidMessage(int level, const char *format, ...)
#define checkCudaErrors(err) __checkCudaErrors (err, __FILE__, __LINE__)
// These are the inline versions for all of the SDK helper functions
inline void __checkCudaErrors(CUresult err, const char *file, const int line)
static inline void __checkCudaErrors(CUresult err, const char *file, const int line)
{
if (CUDA_SUCCESS != err)
{
@ -2190,7 +2190,7 @@ void SDK_CHECK_ERROR_GL() {
GLenum gl_error = glGetError();
if (gl_error != GL_NO_ERROR) {
Fatal(_("video/cuvid: SDL error %d: %d\n"),gl_error);
Fatal(_("video/cuvid: SDL error %d\n"),gl_error);
}
}