Skip to content

Conversation

@fabio-porcedda
Copy link

Fix some Dead Store warnings found by the Infer static analysis tool:

csv.c:53: error: Dead Store
The value written to &efi_status is 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 &dp is 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 &PEHdr is 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 &Section is 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,

Fix some Dead Store warnings found by the Infer static analysis tool:

csv.c:53: error: Dead Store
  The value written to `&efi_status` is 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 `&dp` is 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 `&PEHdr` is 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 `&Section` is 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,

Signed-off-by: Fabio Porcedda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant