Bug 363111

Summary: ki18n 5.22.0 compile fails with 'translation_found' was not declared in this scope
Product: [Frameworks and Libraries] frameworks-ki18n Reporter: Jan-Matthias Braun <jan_braun>
Component: generalAssignee: Chusslove Illich <caslav.ilic>
Status: RESOLVED FIXED    
Severity: normal CC: caslav.ilic, faure, kdelibs-bugs, release-team
Priority: NOR    
Version: 5.22.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Fix the compile by moving the definition before the #ifdef.
Patch v2: make the first use of translation_found the definition.

Description Jan-Matthias Braun 2016-05-15 22:52:26 UTC
Created attachment 98998 [details]
Fix the compile by moving the definition before the #ifdef.

The variable translation_found is defined in the else branch of the #ifdef _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS block in gettext.h before line 180, but used unconditionally in line 180.

The compile fails with
/var/tmp/portage/kde-frameworks/ki18n-5.22.0/work/ki18n-5.22.0/src/gettext.h:180:9: error: 'translation_found' was not declared in this scope
         translation_found = !(translation == msg_ctxt_id || translation == msgid_plural);
         ^
Comment 1 Jan-Matthias Braun 2016-05-15 23:02:30 UTC
Created attachment 98999 [details]
Patch v2: make the first use of translation_found the definition.
Comment 2 Chusslove Illich 2016-05-15 23:16:50 UTC
This was already fixed, but apparently a few hours too late for 5.22. I'll add release team to CC, if any remedy before 5.23 is in order.
Comment 3 David Faure 2016-05-16 22:03:14 UTC
sources/ki18n-5.22.1.tar.xz uploaded for packagers.