1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-30 10:38:37 +00:00
freebsd-ports/chinese
Dimitry Andric 0efce95397 chinese/c2t: fix "error: address of register variable requested"
During an exp-run for llvm 13 (see bug 258209), it turned out that
chinese/c2t fails to build with clang 13:

cc -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -DCHINDICT=\"/usr/local/share/chinese/gb/TONEPY.tit\" -c c2t.c
c2t.c:99:3: error: address of register variable requested
  hz[2] = '\0';
  ^~
c2t.c:107:7: error: address of register variable requested
      hz[0] = (char)eka;
      ^~
c2t.c:108:7: error: address of register variable requested
      hz[1] = (char)toka;
      ^~
c2t.c:113:8: error: address of register variable requested
          if (hz[0] != (*pipo)[i] || hz[1] != (*pipo)[i+1]) continue;
              ^~
c2t.c:113:31: error: address of register variable requested
          if (hz[0] != (*pipo)[i] || hz[1] != (*pipo)[i+1]) continue;
                                     ^~
c2t.c:133:36: error: address of register variable requested
                fprintf(miss_chars, "%c", hz[0]);
                                          ^~
c2t.c:134:30: error: address of register variable requested
                fprintf(miss_chars, "%c ", hz[1]);
                                           ^~
c2t.c:143:17: error: address of register variable requested
                        printf("%c", hz[0]);
                                     ^~
c2t.c:144:18: error: address of register variable requested
                        printf("%c ", hz[1]);
                                      ^~
9 errors generated.

As indicated, arrays shouldn't be register variables as they don't have
addresses. In general, the register keyword is deprecated and should no
longer be used.

To fix this, use a command line flag to define "register" to empty.

PR:		258465
Approved by:	maintainer timeout (2 weeks)
MFH:		2021Q4
2021-10-02 13:19:56 +02:00
..
arphicttf
aterm chinese/aterm: Add CPE information 2021-08-31 19:49:55 +00:00
auto-cn-l10n
auto-tw-l10n
autoconvert
big5width
bitchx
brise
bsdconv-opencc
bug5
c2t chinese/c2t: fix "error: address of register variable requested" 2021-10-02 13:19:56 +02:00
cconv
celvis
chiconv
CJKUnifonts
cless
cnprint
CNS11643-font
dictd-database
enscript
eterm
fandol
fcitx
fcitx5-chewing
fcitx5-chinese-addons
fcitx5-rime
fcitx5-table-extra
fcitx5-table-other
fcitx-chewing
fcitx-cloudpinyin
fcitx-configtool
fcitx-libpinyin cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
fcitx-rime
fcitx-table-extra
fcitx-ui-light
fireflyttf
font-std
fortunetw
FreeWnn-lib
FreeWnn-server
gb2jis
gb2ps
gcin
gcin-gtk3
gcin-qt5
gydict
hc
ibus-cangjie
ibus-chewing
ibus-libpinyin cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
ibus-pinyin
ibus-rime
ibus-table-chinese
jis2gb
kcfonts
libcangjie
libchewing
libime
libime-jyutping
libpinyin cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
libreoffice-zh_CN editors/libreoffice: update to 7.2.1 release (+) 2021-09-17 04:14:10 +10:00
libreoffice-zh_TW editors/libreoffice: update to 7.2.1 release (+) 2021-09-17 04:14:10 +10:00
librime
libtabe
linux-wps-office-zh_CN
lunar
moettf
muni
oicq
opencc
opendesktop-fonts
oto
p5-Date-Chinese
p5-Encode-CNMap
p5-Encode-HanConvert
p5-Encode-HanExtra
p5-Lingua-Han-PinYin
p5-Lingua-Han-Utils
p5-Lingua-ZH-HanDetect
p5-Lingua-ZH-Keywords
p5-Lingua-ZH-Numbers
p5-Lingua-ZH-Romanize-Pinyin
p5-Lingua-ZH-Segment
p5-Lingua-ZH-Summarize
p5-Lingua-ZH-TaBE
p5-Lingua-ZH-Toke
p5-Lingua-ZH-WordSegmenter
p5-Lingua-ZH-Wrap
p5-Text-Greeking-zh_TW
pcmanx
php-opencc
phpbb3-tw
phpbb-tw
pycangjie
pyzy
qe
rime-array
rime-bopomofo
rime-cangjie
rime-cantonese
rime-combo-pinyin
rime-data-full
rime-double-pinyin
rime-emoji
rime-essay
rime-ipa
rime-jyutping
rime-luna-pinyin
rime-middle-chinese
rime-pinyin-simp
rime-prelude
rime-quick
rime-scj
rime-soutzoe
rime-stenotype
rime-stroke
rime-terra-pinyin
rime-wubi
rime-wugniu
scim-fcitx
scim-pinyin
scim-tables
sourcehansans-sc-otf
sourcehansans-tc-otf
sourcehanserif-sc-otf
sourcehanserif-tc-otf
taipeisanstc
tin
tintin++
ttf2pt1
ttfm
ve
wenju
wordpress-zh_CN */wordpress-*: Update to 5.8 2021-09-03 06:26:52 +02:00
wordpress-zh_TW */wordpress-*: Update to 5.8 2021-09-03 06:26:52 +02:00
Makefile
Makefile.inc