frontend: fix all compiler warnings
This commit is contained in:
@@ -22,7 +22,7 @@ static enum ivy_status readline(
|
||||
struct line_ed *ed = LINE_ED_FROM_LEX_SOURCE(src);
|
||||
|
||||
line_ed_set_scope_type(ed, scope_type);
|
||||
long r = line_ed_readline(ed, out, max);
|
||||
size_t r = line_ed_readline(ed, out, max);
|
||||
line_ed_set_scope_type(ed, NULL);
|
||||
|
||||
if (r < 0) {
|
||||
@@ -102,10 +102,10 @@ static void clear_buffer(struct line_ed *ed)
|
||||
static void convert_continuation_feeds(char *s, size_t max)
|
||||
{
|
||||
char *end = s + max;
|
||||
unsigned int len = strlen(s);
|
||||
size_t len = strlen(s);
|
||||
|
||||
while (1) {
|
||||
unsigned int r = strcspn(s, "\\");
|
||||
size_t r = strcspn(s, "\\");
|
||||
if (s + r > end) {
|
||||
break;
|
||||
}
|
||||
@@ -130,10 +130,10 @@ static void convert_continuation_feeds(char *s, size_t max)
|
||||
static void remove_continuation_feeds(char *s, size_t max)
|
||||
{
|
||||
char *end = s + max;
|
||||
unsigned int len = strlen(s);
|
||||
size_t len = strlen(s);
|
||||
|
||||
while (1) {
|
||||
unsigned int r = strcspn(s, "\\");
|
||||
size_t r = strcspn(s, "\\");
|
||||
if (s + r > end) {
|
||||
break;
|
||||
}
|
||||
@@ -167,12 +167,12 @@ static bool input_is_empty(struct line_ed *ed)
|
||||
return true;
|
||||
}
|
||||
|
||||
long line_ed_readline(struct line_ed *ed, char *out, size_t max)
|
||||
size_t line_ed_readline(struct line_ed *ed, char *out, size_t max)
|
||||
{
|
||||
clear_buffer(ed);
|
||||
|
||||
bool append_history = false;
|
||||
unsigned int append_to_index = (unsigned int)-1;
|
||||
size_t append_to_index = (size_t)-1;
|
||||
if (!ed->l_scope_type) {
|
||||
alloc_empty_history_entry(ed);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user