diff --git a/scripts/js/opencl.js b/scripts/js/opencl.js index 878aa44b4..ec8c44544 100644 --- a/scripts/js/opencl.js +++ b/scripts/js/opencl.js @@ -6,7 +6,7 @@ const fs = require('fs'); function bin2h(buf, namespace, name) { const size = buf.byteLength; - let out = `#pragma once\n\nnamespace ${namespace} {\n\nstatic unsigned char ${name}[${size}] = {\n `; + let out = `#pragma once\n\nnamespace ${namespace} {\n\nstatic const unsigned char ${name}[${size}] = {\n `; let b = 32; for (let i = 0; i < size; i++) { @@ -28,7 +28,7 @@ function text2h_internal(text, name) { const buf = Buffer.from(text); const size = buf.byteLength; - let out = `\nstatic char ${name}[${size + 1}] = {\n `; + let out = `\nstatic const char ${name}[${size + 1}] = {\n `; let b = 32; for (let i = 0; i < size; i++) { diff --git a/src/3rdparty/libethash/ethash_internal.c b/src/3rdparty/libethash/ethash_internal.c index 763e94c8a..7c7681e52 100644 --- a/src/3rdparty/libethash/ethash_internal.c +++ b/src/3rdparty/libethash/ethash_internal.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "ethash.h" #include "fnv.h" #include "endian.h" diff --git a/src/backend/opencl/cl/astrobwt/astrobwt_cl.h b/src/backend/opencl/cl/astrobwt/astrobwt_cl.h index 7a4909e01..def734057 100644 --- a/src/backend/opencl/cl/astrobwt/astrobwt_cl.h +++ b/src/backend/opencl/cl/astrobwt/astrobwt_cl.h @@ -2,7 +2,7 @@ namespace xmrig { -static char astrobwt_cl[12440] = { +static const char astrobwt_cl[12440] = { 0x74,0x79,0x70,0x65,0x64,0x65,0x66,0x20,0x75,0x63,0x68,0x61,0x72,0x20,0x75,0x69,0x6e,0x74,0x38,0x5f,0x74,0x3b,0x0a,0x74,0x79,0x70,0x65,0x64,0x65,0x66,0x20,0x75, 0x73,0x68,0x6f,0x72,0x74,0x20,0x75,0x69,0x6e,0x74,0x31,0x36,0x5f,0x74,0x3b,0x0a,0x74,0x79,0x70,0x65,0x64,0x65,0x66,0x20,0x75,0x69,0x6e,0x74,0x20,0x75,0x69,0x6e, 0x74,0x33,0x32,0x5f,0x74,0x3b,0x0a,0x74,0x79,0x70,0x65,0x64,0x65,0x66,0x20,0x75,0x6c,0x6f,0x6e,0x67,0x20,0x75,0x69,0x6e,0x74,0x36,0x34,0x5f,0x74,0x3b,0x0a,0x74, diff --git a/src/backend/opencl/cl/cn/cryptonight_cl.h b/src/backend/opencl/cl/cn/cryptonight_cl.h index 81c92c12c..3684cfd5f 100644 --- a/src/backend/opencl/cl/cn/cryptonight_cl.h +++ b/src/backend/opencl/cl/cn/cryptonight_cl.h @@ -2,7 +2,7 @@ namespace xmrig { -static char cryptonight_cl[60551] = { +static const char cryptonight_cl[60551] = { 0x23,0x69,0x66,0x64,0x65,0x66,0x20,0x63,0x6c,0x5f,0x63,0x6c,0x61,0x6e,0x67,0x5f,0x73,0x74,0x6f,0x72,0x61,0x67,0x65,0x5f,0x63,0x6c,0x61,0x73,0x73,0x5f,0x73,0x70, 0x65,0x63,0x69,0x66,0x69,0x65,0x72,0x73,0x0a,0x23,0x70,0x72,0x61,0x67,0x6d,0x61,0x20,0x4f,0x50,0x45,0x4e,0x43,0x4c,0x20,0x45,0x58,0x54,0x45,0x4e,0x53,0x49,0x4f, 0x4e,0x20,0x63,0x6c,0x5f,0x63,0x6c,0x61,0x6e,0x67,0x5f,0x73,0x74,0x6f,0x72,0x61,0x67,0x65,0x5f,0x63,0x6c,0x61,0x73,0x73,0x5f,0x73,0x70,0x65,0x63,0x69,0x66,0x69, diff --git a/src/backend/opencl/cl/cn/cryptonight_r_cl.h b/src/backend/opencl/cl/cn/cryptonight_r_cl.h index 62da38098..59fef50d9 100644 --- a/src/backend/opencl/cl/cn/cryptonight_r_cl.h +++ b/src/backend/opencl/cl/cn/cryptonight_r_cl.h @@ -2,7 +2,7 @@ namespace xmrig { -static char cryptonight_r_defines_cl[7709] = { +static const char cryptonight_r_defines_cl[7709] = { 0x23,0x69,0x66,0x64,0x65,0x66,0x20,0x5f,0x5f,0x4e,0x56,0x5f,0x43,0x4c,0x5f,0x43,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65, 0x20,0x53,0x43,0x52,0x41,0x54,0x43,0x48,0x50,0x41,0x44,0x5f,0x43,0x48,0x55,0x4e,0x4b,0x28,0x4e,0x29,0x20,0x28,0x2a,0x28,0x5f,0x5f,0x6c,0x6f,0x63,0x61,0x6c,0x20, 0x75,0x69,0x6e,0x74,0x34,0x2a,0x29,0x28,0x28,0x5f,0x5f,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x63,0x68,0x61,0x72,0x2a,0x29,0x28,0x73,0x63,0x72,0x61,0x74,0x63,0x68, @@ -246,7 +246,7 @@ static char cryptonight_r_defines_cl[7709] = { 0x5d,0x2c,0x30,0x55,0x2c,0x30,0x55,0x2c,0x30,0x55,0x29,0x29,0x3a,0x74,0x29,0x3b,0x0a,0x7d,0x0a,0x7d,0x0a,0x23,0x65,0x6e,0x64,0x69,0x66,0x0a,0x00 }; -static char cryptonight_r_cl[3424] = { +static const char cryptonight_r_cl[3424] = { 0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x72,0x65,0x71,0x64,0x5f,0x77,0x6f,0x72,0x6b,0x5f,0x67,0x72,0x6f,0x75,0x70,0x5f,0x73, 0x69,0x7a,0x65,0x28,0x57,0x4f,0x52,0x4b,0x53,0x49,0x5a,0x45,0x2c,0x31,0x2c,0x31,0x29,0x29,0x29,0x0a,0x5f,0x5f,0x6b,0x65,0x72,0x6e,0x65,0x6c,0x20,0x76,0x6f,0x69, 0x64,0x20,0x4b,0x45,0x52,0x4e,0x45,0x4c,0x5f,0x4e,0x41,0x4d,0x45,0x28,0x5f,0x5f,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x20,0x75,0x6c,0x6f,0x6e,0x67,0x20,0x2a,0x69,0x6e, diff --git a/src/backend/opencl/cl/kawpow/kawpow_cl.h b/src/backend/opencl/cl/kawpow/kawpow_cl.h index c3964b542..375bc5a95 100644 --- a/src/backend/opencl/cl/kawpow/kawpow_cl.h +++ b/src/backend/opencl/cl/kawpow/kawpow_cl.h @@ -2,7 +2,7 @@ namespace xmrig { -static char kawpow_cl[5773] = { +static const char kawpow_cl[5773] = { 0x23,0x69,0x66,0x64,0x65,0x66,0x20,0x63,0x6c,0x5f,0x63,0x6c,0x61,0x6e,0x67,0x5f,0x73,0x74,0x6f,0x72,0x61,0x67,0x65,0x5f,0x63,0x6c,0x61,0x73,0x73,0x5f,0x73,0x70, 0x65,0x63,0x69,0x66,0x69,0x65,0x72,0x73,0x0a,0x23,0x70,0x72,0x61,0x67,0x6d,0x61,0x20,0x4f,0x50,0x45,0x4e,0x43,0x4c,0x20,0x45,0x58,0x54,0x45,0x4e,0x53,0x49,0x4f, 0x4e,0x20,0x63,0x6c,0x5f,0x63,0x6c,0x61,0x6e,0x67,0x5f,0x73,0x74,0x6f,0x72,0x61,0x67,0x65,0x5f,0x63,0x6c,0x61,0x73,0x73,0x5f,0x73,0x70,0x65,0x63,0x69,0x66,0x69, diff --git a/src/backend/opencl/cl/kawpow/kawpow_dag_cl.h b/src/backend/opencl/cl/kawpow/kawpow_dag_cl.h index 03edb8b62..862e18404 100644 --- a/src/backend/opencl/cl/kawpow/kawpow_dag_cl.h +++ b/src/backend/opencl/cl/kawpow/kawpow_dag_cl.h @@ -2,7 +2,7 @@ namespace xmrig { -static char kawpow_dag_cl[5990] = { +static const char kawpow_dag_cl[5990] = { 0x23,0x69,0x66,0x64,0x65,0x66,0x20,0x63,0x6c,0x5f,0x63,0x6c,0x61,0x6e,0x67,0x5f,0x73,0x74,0x6f,0x72,0x61,0x67,0x65,0x5f,0x63,0x6c,0x61,0x73,0x73,0x5f,0x73,0x70, 0x65,0x63,0x69,0x66,0x69,0x65,0x72,0x73,0x0a,0x23,0x70,0x72,0x61,0x67,0x6d,0x61,0x20,0x4f,0x50,0x45,0x4e,0x43,0x4c,0x20,0x45,0x58,0x54,0x45,0x4e,0x53,0x49,0x4f, 0x4e,0x20,0x63,0x6c,0x5f,0x63,0x6c,0x61,0x6e,0x67,0x5f,0x73,0x74,0x6f,0x72,0x61,0x67,0x65,0x5f,0x63,0x6c,0x61,0x73,0x73,0x5f,0x73,0x70,0x65,0x63,0x69,0x66,0x69, diff --git a/src/backend/opencl/cl/rx/randomx_cl.h b/src/backend/opencl/cl/rx/randomx_cl.h index 548d59e8e..acf467917 100644 --- a/src/backend/opencl/cl/rx/randomx_cl.h +++ b/src/backend/opencl/cl/rx/randomx_cl.h @@ -2,7 +2,7 @@ namespace xmrig { -static char randomx_cl[130582] = { +static const char randomx_cl[130582] = { 0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x30,0x20,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f, 0x5f,0x43,0x4e,0x5f,0x31,0x20,0x31,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x32,0x20,0x32,0x0a,0x23,0x64,0x65,0x66, 0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,0x52,0x20,0x33,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x43,0x4e,0x5f,