bugGNU GRUB - Bugs: bug #62122, Grub 2.06 mkimage.c fails to build...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #62122: Grub 2.06 mkimage.c fails to build with gcc12-20220220 and -Werror

Submitter:  Rudi Heitbaum <heitbaum>
Submitted:  Sun 27 Feb 2022 12:55:32 PM UTC
   
 
Category:  Compilation Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name:  Rudi Heitbaum
Open/Closed:  Open Release:  other
Release:  Reproducibility:  Every Time
Planned Release:  None

Sun 27 Feb 2022 12:55:32 PM UTC, original submission:  

note: in expansion of macro 'PE_OHDR' errors with: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]

mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~

Compiler is gcc 12-20220220 with -Werror
Successful build can be done using -Wno-error
Successful build was occurring with gcc 11.2.0

full log

/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c: In function 'grub_install_generate_image':
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1386:41: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1386 |         PE_OHDR (o32, o64, header_size) = grub_host_to_target32 (header_size);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1386:9: note: in expansion of macro 'PE_OHDR'
 1386 |         PE_OHDR (o32, o64, header_size) = grub_host_to_target32 (header_size);
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1387:40: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1387 |         PE_OHDR (o32, o64, entry_addr) = grub_host_to_target32 (layout.start_address);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1387:9: note: in expansion of macro 'PE_OHDR'
 1387 |         PE_OHDR (o32, o64, entry_addr) = grub_host_to_target32 (layout.start_address);
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1388:40: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1388 |         PE_OHDR (o32, o64, image_base) = 0;
      |                                        ^
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1388:9: note: in expansion of macro 'PE_OHDR'
 1388 |         PE_OHDR (o32, o64, image_base) = 0;
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1389:40: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1389 |         PE_OHDR (o32, o64, image_size) = grub_host_to_target32 (pe_size);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1389:9: note: in expansion of macro 'PE_OHDR'
 1389 |         PE_OHDR (o32, o64, image_size) = grub_host_to_target32 (pe_size);
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1390:47: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1390 |         PE_OHDR (o32, o64, section_alignment) = grub_host_to_target32 (image_target->section_align);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1390:9: note: in expansion of macro 'PE_OHDR'
 1390 |         PE_OHDR (o32, o64, section_alignment) = grub_host_to_target32 (image_target->section_align);
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1391:44: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1391 |         PE_OHDR (o32, o64, file_alignment) = grub_host_to_target32 (GRUB_PE32_FILE_ALIGNMENT);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1391:9: note: in expansion of macro 'PE_OHDR'
 1391 |         PE_OHDR (o32, o64, file_alignment) = grub_host_to_target32 (GRUB_PE32_FILE_ALIGNMENT);
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1392:39: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1392 |         PE_OHDR (o32, o64, subsystem) = grub_host_to_target16 (GRUB_PE32_SUBSYSTEM_EFI_APPLICATION);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1392:9: note: in expansion of macro 'PE_OHDR'
 1392 |         PE_OHDR (o32, o64, subsystem) = grub_host_to_target16 (GRUB_PE32_SUBSYSTEM_EFI_APPLICATION);
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1395:48: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1395 |         PE_OHDR (o32, o64, stack_reserve_size) = grub_host_to_target32 (0x10000);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1395:9: note: in expansion of macro 'PE_OHDR'
 1395 |         PE_OHDR (o32, o64, stack_reserve_size) = grub_host_to_target32 (0x10000);
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1396:47: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1396 |         PE_OHDR (o32, o64, stack_commit_size) = grub_host_to_target32 (0x10000);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1396:9: note: in expansion of macro 'PE_OHDR'
 1396 |         PE_OHDR (o32, o64, stack_commit_size) = grub_host_to_target32 (0x10000);
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1397:47: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1397 |         PE_OHDR (o32, o64, heap_reserve_size) = grub_host_to_target32 (0x10000);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1397:9: note: in expansion of macro 'PE_OHDR'
 1397 |         PE_OHDR (o32, o64, heap_reserve_size) = grub_host_to_target32 (0x10000);
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1398:46: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1398 |         PE_OHDR (o32, o64, heap_commit_size) = grub_host_to_target32 (0x10000);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1398:9: note: in expansion of macro 'PE_OHDR'
 1398 |         PE_OHDR (o32, o64, heap_commit_size) = grub_host_to_target32 (0x10000);
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1400:50: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1400 |         PE_OHDR (o32, o64, num_data_directories) = grub_host_to_target32 (GRUB_PE32_NUM_DATA_DIRECTORIES);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1400:9: note: in expansion of macro 'PE_OHDR'
 1400 |         PE_OHDR (o32, o64, num_data_directories) = grub_host_to_target32 (GRUB_PE32_NUM_DATA_DIRECTORIES);
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1403:39: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1403 |         PE_OHDR (o32, o64, code_base) = grub_host_to_target32 (vma);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1403:9: note: in expansion of macro 'PE_OHDR'
 1403 |         PE_OHDR (o32, o64, code_base) = grub_host_to_target32 (vma);
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1404:39: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1404 |         PE_OHDR (o32, o64, code_size) = grub_host_to_target32 (layout.exec_size);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1404:9: note: in expansion of macro 'PE_OHDR'
 1404 |         PE_OHDR (o32, o64, code_size) = grub_host_to_target32 (layout.exec_size);
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1415:39: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1415 |         PE_OHDR (o32, o64, data_size) = grub_host_to_target32 (scn_size + sbat_size +
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1415:9: note: in expansion of macro 'PE_OHDR'
 1415 |         PE_OHDR (o32, o64, data_size) = grub_host_to_target32 (scn_size + sbat_size +
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1448:55: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1448 |         PE_OHDR (o32, o64, base_relocation_table.rva) = grub_host_to_target32 (vma);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1448:9: note: in expansion of macro 'PE_OHDR'
 1448 |         PE_OHDR (o32, o64, base_relocation_table.rva) = grub_host_to_target32 (vma);
      |         ^~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1449:56: warning: dangling pointer to 'tmp_' may be used [-Wdangling-pointer=]
 1449 |         PE_OHDR (o32, o64, base_relocation_table.size) = grub_host_to_target32 (scn_size);
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:857:28: note: 'tmp_' declared here
  857 |   _typeof_((o64)->field) tmp_;                \
      |                            ^~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/grub-2.06/util/mkimage.c:1449:9: note: in expansion of macro 'PE_OHDR'
 1449 |         PE_OHDR (o32, o64, base_relocation_table.size) = grub_host_to_target32 (scn_size);
      |         ^~~~~~~

Rudi Heitbaum <heitbaum>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by heitbaum (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-9c15.
    Corresponding source code