revert "removed unused void casts"

yes so it works on my machine

but not on debian-based; fuck

reverts commit 8700f38260350cec20b6c48b30eda977018faab9.
This commit is contained in:
Václav Šmejkal 2023-01-25 20:38:56 +01:00
parent 8700f38260
commit e2eca1e3ea
Signed by: ENGO150
GPG Key ID: F6D6DF86242C5A59
3 changed files with 5 additions and 5 deletions

View File

@ -143,7 +143,7 @@ boolean checkVersion(void)
memset(buffer, '\0', bufferSize);
//LOAD jsonFile
fread(buffer, bufferSize, 1, fileBuffer);
(void) (fread(buffer, bufferSize, 1, fileBuffer) + 1); //TODO: Try to create some function for processing exit value
buffer[bufferSize] = '\0';
@ -400,7 +400,7 @@ void generateKey(char *key, int keyLength)
FILE *fileBuffer;
fileBuffer = fopen("/dev/urandom", "r");
fread(&numberBuffer, sizeof(numberBuffer), 1, fileBuffer);
(void) (fread(&numberBuffer, sizeof(numberBuffer), 1, fileBuffer) + 1); //TODO: Try to create some function for processing exit value
numberBuffer = abs(numberBuffer); //MAKE numberBuffer POSITIVE
srand(numberBuffer);

View File

@ -83,7 +83,7 @@ logFile initLogger(char *directoryPath)
strcpy(latestFilePath, filePath);
if (access(latestBuffer, R_OK) == 0) { unlink(latestBuffer); } //REMOVE SYMLINK IF IT ALREADY EXISTS
symlink(latestFilePath + (strlen(WRITE_DIR) + 1), latestBuffer);
(void) (symlink(latestFilePath + (strlen(WRITE_DIR) + 1), latestBuffer) + 1); //TODO: Try to create some function for processing exit value //CREATE
deallocation:
@ -143,7 +143,7 @@ void writeLog(int loggerFile, char *logMessage)
sprintf(buffer, WRITE_FORMATTING, tm.tm_hour, tm.tm_min, tm.tm_sec, message); //LOAD MESSAGE
write(loggerFile, buffer, strlen(buffer));
(void) (write(loggerFile, buffer, strlen(buffer)) + 1); //TODO: Try to create some function for processing exit value
//DEALLOCATION
free(buffer);

View File

@ -67,7 +67,7 @@ decryptedOutput decryptLogger(logFile logger) //TODO: Fix valgrind issues
rawContent = calloc(rawContentL + 1, sizeof(char)); //CALLOC WILL BE USED FOR CLEANING AFTER ALLOCATION
//LOAD rawContent
fread(rawContent, rawContentL, 1, file); //TODO: Try to create some function for processing exit value
(void) (fread(rawContent, rawContentL, 1, file) + 1); //TODO: Try to create some function for processing exit value
for (int i = 0; i < rawContentL; i++)
{