Fix compile warnings.

This commit is contained in:
XMRig 2020-05-29 20:02:57 +07:00
parent 2fae0e1319
commit 169fad3a5c
No known key found for this signature in database
GPG key ID: 446A53638BE94409
8 changed files with 10 additions and 9 deletions

View file

@ -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++) {