fix warnings
parent
d5158bdd47
commit
3224a33645
|
@ -10,7 +10,7 @@ inline void init_lineedit(cs_state &, ostd::string_range) {
|
|||
|
||||
inline std::optional<std::string> read_line(cs_state &, cs_svar *pr) {
|
||||
ostd::write(pr->get_value());
|
||||
return std::move(ostd::cin.get_line(ostd::appender<std::string>()).get());
|
||||
return ostd::cin.get_line(ostd::appender<std::string>()).get();
|
||||
}
|
||||
|
||||
inline void add_history(cs_state &, ostd::string_range) {
|
||||
|
|
|
@ -72,7 +72,7 @@ inline std::optional<std::string> read_line(cs_state &, cs_svar *pr) {
|
|||
}
|
||||
std::string ret = line;
|
||||
linenoiseFree(line);
|
||||
return std::move(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline void add_history(cs_state &, ostd::string_range line) {
|
||||
|
|
|
@ -76,7 +76,7 @@ inline std::optional<std::string> read_line(cs_state &, cs_svar *pr) {
|
|||
}
|
||||
std::string ret = line;
|
||||
free(line);
|
||||
return std::move(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline void add_history(cs_state &, ostd::string_range line) {
|
||||
|
|
|
@ -350,7 +350,7 @@ static void freeCompletions(linenoiseCompletions *lc) {
|
|||
static int completeLine(struct linenoiseState *ls) {
|
||||
linenoiseCompletions lc = { 0, NULL };
|
||||
int nread, nwritten;
|
||||
char c = 0;
|
||||
signed char c = 0;
|
||||
|
||||
completionCallback(ls->buf,&lc);
|
||||
if (lc.len == 0) {
|
||||
|
@ -793,9 +793,9 @@ static int linenoiseEdit(int stdin_fd, int stdout_fd, char *buf, size_t buflen,
|
|||
|
||||
if (write(l.ofd,prompt,l.plen) == -1) return -1;
|
||||
while(1) {
|
||||
char c;
|
||||
signed char c;
|
||||
int nread;
|
||||
char seq[3];
|
||||
signed char seq[3];
|
||||
|
||||
nread = read(l.ifd,&c,1);
|
||||
if (nread <= 0) return l.len;
|
||||
|
|
|
@ -371,7 +371,7 @@ endargs:
|
|||
return 0;
|
||||
} else {
|
||||
std::string str;
|
||||
for (char c = '\0'; (c = ostd::cin.get_char()) != EOF;) {
|
||||
for (signed char c = '\0'; (c = ostd::cin.get_char()) != EOF;) {
|
||||
str += c;
|
||||
}
|
||||
do_call(gcs, str);
|
||||
|
|
Loading…
Reference in New Issue