Bug 2153024

Summary: fcitx-fbterm: Calls to undeclared fcitx_client_enable_ic, fcitx_client_close_ic functions
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: fcitx-fbtermAssignee: Orphan Owner <extras-orphan>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: extras-orphan, i18n-bugs, liangsuilong, robinlee.sysu, yanqiyu01
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fcitx-4.2.9.9-2.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-16 12:06:00 UTC Type: Bug
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 2022-12-13 19:38:23 UTC
The build logs and the Fedora C99 show that these functions are called without a proper previous declaration:

/builddir/build/BUILD/fcitx-fbterm-0.2.0/src/fcitx-fbterm.c: In function 'im_active':
/builddir/build/BUILD/fcitx-fbterm-0.2.0/src/fcitx-fbterm.c:116:5: warning: implicit declaration of function 'fcitx_client_enable_ic'; did you mean 'fcitx_client_focus_in'? [-Wimplicit-function-declaration]
  116 |     fcitx_client_enable_ic(client);
      |     ^~~~~~~~~~~~~~~~~~~~~~
      |     fcitx_client_focus_in
/builddir/build/BUILD/fcitx-fbterm-0.2.0/src/fcitx-fbterm.c: In function 'im_deactive':
/builddir/build/BUILD/fcitx-fbterm-0.2.0/src/fcitx-fbterm.c:126:5: warning: implicit declaration of function 'fcitx_client_close_ic'; did you mean 'fcitx_client_reset'? [-Wimplicit-function-declaration]
  126 |     fcitx_client_close_ic(client);
      |     ^~~~~~~~~~~~~~~~~~~~~
      |     fcitx_client_reset

I investigated this and it seems the proper fix is actually in fcitx: Declare these functions in the appropriate header file. I submitted a pull request to this effect:

  fcitx-gclient: Export fcitx_client_enable_ic, fcitx_client_close_ic
  <https://github.com/fcitx/fcitx/pull/521>

This bug is just a reminder to re-test fcitx-fbterm once fcitx has been updated accordingly.