frontend: fix all compiler warnings
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#include "buffer.h"
|
||||
#include "line-ed.h"
|
||||
|
||||
const char *line_start(struct line_ed *ed, unsigned int y)
|
||||
const char *line_start(struct line_ed *ed, size_t y)
|
||||
{
|
||||
const char *line = ed->l_buf;
|
||||
|
||||
for (unsigned int i = 0; i < y; i++) {
|
||||
for (size_t i = 0; i < y; i++) {
|
||||
line += strcspn(line, "\n");
|
||||
|
||||
if (*line == '\n') {
|
||||
@@ -16,11 +16,11 @@ const char *line_start(struct line_ed *ed, unsigned int y)
|
||||
return line;
|
||||
}
|
||||
|
||||
unsigned int line_length(struct line_ed *ed, unsigned int y)
|
||||
size_t line_length(struct line_ed *ed, size_t y)
|
||||
{
|
||||
const char *line = ed->l_buf;
|
||||
|
||||
for (unsigned int i = 0; i < y; i++) {
|
||||
for (size_t i = 0; i < y; i++) {
|
||||
line += strcspn(line, "\n");
|
||||
if (*line == '\n') {
|
||||
line++;
|
||||
@@ -31,7 +31,7 @@ unsigned int line_length(struct line_ed *ed, unsigned int y)
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned int len = strcspn(line, "\n");
|
||||
size_t len = strcspn(line, "\n");
|
||||
if (line[len] == '\n') {
|
||||
len++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user