Fix some Infer Dead Store warnings #783
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix some Dead Store warnings found by the Infer static analysis tool:
csv.c:53: error: Dead Store
The value written to
&efi_statusis never used.51. parse_csv_data(char *data, char *data_end, size_t n_columns, list_t *list)
52. {
53. EFI_STATUS efi_status = EFI_OUT_OF_RESOURCES; ^
54. char delims[] = "\r\n";
55. char *line = data;
fallback.c:71: error: Dead Store
The value written to
&dpis never used.69. EFI_DEVICE_PATH **Out)
70. {
71. EFI_DEVICE_PATH *dp = In; ^
72. if (!In || !Out)
73. return EFI_INVALID_PARAMETER;
post-process-pe.c:125: error: Dead Store
The value written to
&PEHdris never used.123. {
124. EFI_IMAGE_DOS_HEADER *DOSHdr = data;
125. EFI_IMAGE_OPTIONAL_HEADER_UNION *PEHdr = data; ^
126. size_t HeaderWithoutDataDir, SectionHeaderOffset, OptHeaderSize;
127. size_t FileAlignment = 0;
post-process-pe.c:393: error: Dead Store
The value written to
&Sectionis never used.391. } 392.
393. Section = ctx->FirstSection; ^
394. for (i=0, Section = ctx->FirstSection; i < ctx->NumberOfSections; i++, Section++) {
395. debug(NOISE, "Section %d has WRITE=%d and EXECUTE=%d\n", i,