Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gb2313 clang warnings #1163

Closed
samcv opened this issue Aug 25, 2019 · 0 comments
Closed

gb2313 clang warnings #1163

samcv opened this issue Aug 25, 2019 · 0 comments
Assignees

Comments

@samcv
Copy link
Member

samcv commented Aug 25, 2019

src/strings/gb2312.c:36:118: warning: format specifies type 'unsigned char' but the argument has type 'MVMuint16'
      (aka 'unsigned short') [-Wformat]
                    MVM_exception_throw_adhoc(tc, "Error decoding gb2312 string: could not decode codepoint 0x%hhX", codepoint);
                                                                                                              ~~~~   ^~~~~~~~~
                                                                                                              %hX
src/strings/gb2312.c:132:17: warning: format specifies type 'unsigned char' but the argument has type 'MVMuint16'
      (aka 'unsigned short') [-Wformat]
                last_codepoint);
                ^~~~~~~~~~~~~~
src/strings/gb2312.c:136:17: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
                last_codepoint * 256 + codepoint);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/strings/gb2312.c:261:118: warning: format specifies type 'unsigned char' but the argument has type 'MVMCodepoint' (aka 'int')
      [-Wformat]
                    MVM_exception_throw_adhoc(tc, "Error encoding gb2312 string: could not encode codepoint 0x%hhX", codepoint);
                                                                                                              ~~~~   ^~~~~~~~~
                                                                                                              %X
compiling src/profiler/instrument.o
compiling src/profiler/log.o
compiling src/profiler/profile.o
4 warnings generated.
compiling src/profiler/heapsnapshot.o
src/strings/gb18030.c:174:26: warning: format specifies type 'unsigned char' but the argument has type 'MVMint32' (aka 'int')
      [-Wformat]
                         len4_byte1, len4_byte2, len4_byte3, len4_byte4);
                         ^~~~~~~~~~
src/strings/gb18030.c:174:38: warning: format specifies type 'unsigned char' but the argument has type 'MVMint32' (aka 'int')
      [-Wformat]
                         len4_byte1, len4_byte2, len4_byte3, len4_byte4);
                                     ^~~~~~~~~~
src/strings/gb18030.c:174:50: warning: format specifies type 'unsigned char' but the argument has type 'MVMint32' (aka 'int')
      [-Wformat]
                         len4_byte1, len4_byte2, len4_byte3, len4_byte4);
                                                 ^~~~~~~~~~
src/strings/gb18030.c:174:62: warning: format specifies type 'unsigned char' but the argument has type 'MVMint32' (aka 'int')
      [-Wformat]
                         len4_byte1, len4_byte2, len4_byte3, len4_byte4);
                                                             ^~~~~~~~~~
src/strings/gb18030.c:211:25: warning: format specifies type 'unsigned char' but the argument has type 'MVMint32' (aka 'int')
      [-Wformat]
                        last_codepoint, codepoint);
                        ^~~~~~~~~~~~~~
src/strings/gb18030.c:211:41: warning: format specifies type 'unsigned char' but the argument has type 'MVMint32' (aka 'int')
      [-Wformat]
                        last_codepoint, codepoint);
                                        ^~~~~~~~~
src/strings/gb18030.c:323:123: warning: format specifies type 'unsigned char' but the argument has type 'MVMCodepoint' (aka 'int')
      [-Wformat]
                        MVM_exception_throw_adhoc(tc, "Error encoding gb18030 string: could not encode codepoint 0x%hhX", codepoint);
                                                                                                                   ~~~~   ^~~~~~~~~
                                                                                                                   %X
compiling src/profiler/telemeh.o
ZhongnianTao added a commit to ZhongnianTao/MoarVM that referenced this issue Aug 29, 2019
ZhongnianTao added a commit that referenced this issue Aug 29, 2019
ZhongnianTao added a commit that referenced this issue Aug 29, 2019
Kaiepi pushed a commit to Kaiepi/MoarVM that referenced this issue Sep 6, 2019
Kaiepi pushed a commit to Kaiepi/MoarVM that referenced this issue Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants