Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux/LinuxProcessTable.c:795:11: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] 795 | while (fgets(buffer, sizeof(buffer), fp)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ linux/LinuxProcessTable.c:795:11: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] 795 | while (fgets(buffer, sizeof(buffer), fp)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ linux/LinuxProcessTable.c:840:11: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] 840 | while (fgets(linebuf, sizeof(linebuf), file) != NULL) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ linux/LinuxProcessTable.c:840:11: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] 840 | while (fgets(linebuf, sizeof(linebuf), file) != NULL) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ linux/LinuxMachine.c:81:22: warning: The 1st argument to 'openat' is between -99 and -1 but should be a valid file descriptor or AT_FDCWD [unix.StdCLibraryFunctions] 81 | int cpuDirFd = openat(dirfd(dir), entry->d_name, O_DIRECTORY | O_PATH | O_NOFOLLOW); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ linux/LinuxMachine.c:501:11: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] 501 | while (fgets(buffer, sizeof(buffer), file)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ linux/LinuxMachine.c:501:11: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] 501 | while (fgets(buffer, sizeof(buffer), file)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ linux/Platform.c:467:22: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] 467 | } while ((bytes = fread(env + size, 1, capacity - size, fp)) > 0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ linux/Platform.c:467:22: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] 467 | } while ((bytes = fread(env + size, 1, capacity - size, fp)) > 0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ linux/Platform.c:585:15: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] 585 | total = fscanf(fp, "full avg10=%32lf avg60=%32lf avg300=%32lf total=%*f ", ten, sixty, threehundred); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ linux/Platform.c:585:15: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream] 585 | total = fscanf(fp, "full avg10=%32lf avg60=%32lf avg300=%32lf total=%*f ", ten, sixty, threehundred); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ linux/Platform.c:789:21: warning: The 1st argument to 'openat' is between -99 and -1 but should be a valid file descriptor or AT_FDCWD [unix.StdCLibraryFunctions] 789 | int entryFd = openat(dirfd(dir), entryName, O_DIRECTORY | O_PATH); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Loading branch information