preventing from [-Werror=unused-result]

This commit is contained in:
Václav Šmejkal 2022-12-04 19:44:10 +01:00
parent 67170b2635
commit cec421cbe5
No known key found for this signature in database
GPG Key ID: FD749A97DF2D5E19
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ outputFlags encryptText(char *text, char *keyNew)
//TRY TO MAKE RANDOM GENERATION REALLY "RANDOM"
fileBuffer = fopen("/dev/urandom", "r");
fread(&numberBuffer, sizeof(numberBuffer), 1, fileBuffer);
if (fread(&numberBuffer, sizeof(numberBuffer), 1, fileBuffer) == 0) abort(); //TODO: Make it safe
srand(numberBuffer);
numberBuffer = abs(numberBuffer); //MAKE numberBuffer POSITIVE

View File

@ -141,7 +141,7 @@ boolean checkVersion()
strcpy(buffer, "");
//LOAD jsonFile
fread(buffer, bufferSize, 1, fileBuffer);
if (fread(buffer, bufferSize, 1, fileBuffer) == 0) abort(); //TODO: Make it safe
buffer[bufferSize] = '\0';