Bug 2336251

Summary: MagicPoint fails to build with gcc 15/C23 ("mgp.c:114:14: error: conflicting types for 'expandPath'; have 'char *(char *)'")
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: MagicPointAssignee: Hans de Goede <hdegoede>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: hdegoede
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: MagicPoint-1.13a-42.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-04 14:40:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2333037    

Description Dave Malcolm 2025-01-07 21:33:37 UTC
I'm experimentally rebuilding rawhide with the not-yet-released GCC 15 to see if anything breaks, and to help write the porting guide.  See https://fedoraproject.org/wiki/User:Dmalcolm/gcc-15

My test build with GCC 15 failed:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed/build/8476037/

whereas my test build with GCC 14 succeeded:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed.checker/build/8477585/

Looking at the failure logs e.g.
https://download.copr.fedorainfracloud.org/results/dmalcolm/gcc-15-smoketest-3.failed/fedora-rawhide-x86_64/08476037-MagicPoint/builder-live.log.gz

I see:

mgp.c:114:14: error: conflicting types for 'expandPath'; have 'char *(char *)'
  114 | extern char *expandPath __P((char *));
      |              ^~~~~~~~~~
In file included from mgp.h:73,
                 from mgp.c:34:
image/xloadimage.h:79:7: note: previous declaration of 'expandPath' with type 'char *(void)'
   79 | char *expandPath(); /* path.c */
      |       ^~~~~~~~~~

Looks like C23 issues; see https://fedoraproject.org/wiki/User:Dmalcolm/gcc-15#C23:_Function_prototypes_with_empty_params_change_from_implicit_%22int%22_to_%22void%22

Reproducible: Always

Comment 1 Fedora Update System 2025-02-04 14:38:05 UTC
FEDORA-2025-6b80dd2690 (MagicPoint-1.13a-42.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-6b80dd2690

Comment 2 Fedora Update System 2025-02-04 14:40:52 UTC
FEDORA-2025-6b80dd2690 (MagicPoint-1.13a-42.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.