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

Fix gcc8 warnings in str.c and canvas.c #10610

Merged
merged 1 commit into from Jul 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions libr/include/r_util/r_str.h
Expand Up @@ -38,8 +38,8 @@ R_API bool r_str_range_in(const char *r, ut64 addr);
R_API int r_str_len_utf8(const char *s);
R_API int r_str_len_utf8char(const char *s, int left);
R_API void r_str_filter_zeroline(char *str, int len);
R_API int r_str_utf8_codepoint (char* s, int left);
R_API bool r_str_char_fullwidth (char* s, int left);
R_API int r_str_utf8_codepoint (const char* s, int left);
R_API bool r_str_char_fullwidth (const char* s, int left);
R_API int r_str_write(int fd, const char *b);
R_API void r_str_ncpy(char *dst, const char *src, int n);
R_API void r_str_sanitize(char *c);
Expand Down
4 changes: 2 additions & 2 deletions libr/util/str.c
Expand Up @@ -1600,7 +1600,7 @@ R_API char *r_str_ansi_crop(const char *str, ut32 x, ut32 y, ut32 x2, ut32 y2) {
return ret;
}

R_API int r_str_utf8_codepoint (char* s, int left) {
R_API int r_str_utf8_codepoint (const char* s, int left) {
bool safe = left >= 0;
if ((*s & 0x80) != 0x80) {
return 0;
Expand All @@ -1614,7 +1614,7 @@ R_API int r_str_utf8_codepoint (char* s, int left) {
return 0;
}

R_API bool r_str_char_fullwidth (char* s, int left) {
R_API bool r_str_char_fullwidth (const char* s, int left) {
int codepoint = r_str_utf8_codepoint (s, left);
return (codepoint >= 0x1100 &&
(codepoint <= 0x115f || /* Hangul Jamo init. consonants */
Expand Down