Skip to content

Commit

Permalink
fix gcc8 warnings in str.c canvas.c
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanpencil authored and XVilka committed Jul 4, 2018
1 parent 145ce4a commit 489037f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 489037f

Please sign in to comment.