Bug 2256906

Summary: paps: C type error in downstream-only paps-fix-cpi.patch
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: papsAssignee: Akira TAGOH <tagoh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: i18n-bugs, tagoh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: paps-0.8.0-6.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-01-17 13:48:26 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: 2137512    

Description Florian Weimer 2024-01-05 06:39:11 UTC
GCC 14 will fail to build this package because there is a C type error:

paps.c: In function ‘split_text_into_paragraphs’:
paps.c:866:34: error: assignment to ‘gunichar’ {aka ‘unsigned int’} from ‘gchar *’ {aka ‘char *’} makes integer from pointer without a cast
  866 |                               wc = g_utf8_prev_char(next);
      |                                  ^

As far as I can see, this line comes from paps-fix-cpi.patch.

It's not clear how this is supposed to work. Is the intent to back up one character, updating the next pointer?

Reproducible: Always

Comment 1 Akira TAGOH 2024-01-17 13:14:18 UTC
That code block tries to align the text length against a parameter of the column per inch and recapturing current processing character for next one.

Comment 2 Fedora Update System 2024-01-17 13:47:56 UTC
FEDORA-2024-b614585844 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2024-b614585844

Comment 3 Fedora Update System 2024-01-17 13:48:26 UTC
FEDORA-2024-b614585844 has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Florian Weimer 2024-01-17 14:12:32 UTC
Thank you, also re-checked with the instrumented compiler. Looks good.