removed unused void casts

wtf without it, it was throwing compile errors (like month ago) and now it works perfectly fine wtfff
This commit is contained in:
Václav Šmejkal 2023-01-25 20:37:26 +01:00
parent c5255bfa3e
commit 8700f38260
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); memset(buffer, '\0', bufferSize);
//LOAD jsonFile //LOAD jsonFile
(void) (fread(buffer, bufferSize, 1, fileBuffer) + 1); //TODO: Try to create some function for processing exit value fread(buffer, bufferSize, 1, fileBuffer);
buffer[bufferSize] = '\0'; buffer[bufferSize] = '\0';
@ -400,7 +400,7 @@ void generateKey(char *key, int keyLength)
FILE *fileBuffer; FILE *fileBuffer;
fileBuffer = fopen("/dev/urandom", "r"); fileBuffer = fopen("/dev/urandom", "r");
(void) (fread(&numberBuffer, sizeof(numberBuffer), 1, fileBuffer) + 1); //TODO: Try to create some function for processing exit value fread(&numberBuffer, sizeof(numberBuffer), 1, fileBuffer);
numberBuffer = abs(numberBuffer); //MAKE numberBuffer POSITIVE numberBuffer = abs(numberBuffer); //MAKE numberBuffer POSITIVE
srand(numberBuffer); srand(numberBuffer);

View File

@ -83,7 +83,7 @@ logFile initLogger(char *directoryPath)
strcpy(latestFilePath, filePath); strcpy(latestFilePath, filePath);
if (access(latestBuffer, R_OK) == 0) { unlink(latestBuffer); } //REMOVE SYMLINK IF IT ALREADY EXISTS if (access(latestBuffer, R_OK) == 0) { unlink(latestBuffer); } //REMOVE SYMLINK IF IT ALREADY EXISTS
(void) (symlink(latestFilePath + (strlen(WRITE_DIR) + 1), latestBuffer) + 1); //TODO: Try to create some function for processing exit value //CREATE symlink(latestFilePath + (strlen(WRITE_DIR) + 1), latestBuffer);
deallocation: 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 sprintf(buffer, WRITE_FORMATTING, tm.tm_hour, tm.tm_min, tm.tm_sec, message); //LOAD MESSAGE
(void) (write(loggerFile, buffer, strlen(buffer)) + 1); //TODO: Try to create some function for processing exit value write(loggerFile, buffer, strlen(buffer));
//DEALLOCATION //DEALLOCATION
free(buffer); 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 rawContent = calloc(rawContentL + 1, sizeof(char)); //CALLOC WILL BE USED FOR CLEANING AFTER ALLOCATION
//LOAD rawContent //LOAD rawContent
(void) (fread(rawContent, rawContentL, 1, file) + 1); //TODO: Try to create some function for processing exit value fread(rawContent, rawContentL, 1, file); //TODO: Try to create some function for processing exit value
for (int i = 0; i < rawContentL; i++) for (int i = 0; i < rawContentL; i++)
{ {