diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-03-15 15:16:29 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2018-03-15 15:16:29 +0200 |
commit | a6d33abe1d17ea1d004c645cc27120c92d7aa8e6 (patch) | |
tree | a752e9c99368d017c7da7ab8e731cfb706979068 | |
parent | 58a8936d30bbb18b8ad93fecfe3fe2210d1c18b2 (diff) | |
download | eclat-a6d33abe1d17ea1d004c645cc27120c92d7aa8e6.tar.gz eclat-a6d33abe1d17ea1d004c645cc27120c92d7aa8e6.tar.bz2 |
Minor fixes
-rw-r--r-- | lib/confirm.c | 3 | ||||
-rw-r--r-- | lib/forlan.c | 6 | ||||
-rw-r--r-- | lib/forlangrm.y | 4 | ||||
-rw-r--r-- | lib/forlanlex.l | 1 | ||||
-rw-r--r-- | lib/ldapmap.c | 3 | ||||
-rw-r--r-- | src/ispeek.c | 2 | ||||
-rw-r--r-- | src/util.c | 5 |
7 files changed, 13 insertions, 11 deletions
diff --git a/lib/confirm.c b/lib/confirm.c index ff60440..550a822 100644 --- a/lib/confirm.c +++ b/lib/confirm.c @@ -1,5 +1,5 @@ /* This file is part of Eclat. - Copyright (C) 2012-2015 Sergey Poznyakoff. + Copyright (C) 2012-2018 Sergey Poznyakoff. Eclat is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,6 +15,7 @@ along with Eclat. If not, see <http://www.gnu.org/licenses/>. */ #include "libeclat.h" +#include <unistd.h> #include <sysexits.h> int diff --git a/lib/forlan.c b/lib/forlan.c index 977271d..9fc80cb 100644 --- a/lib/forlan.c +++ b/lib/forlan.c @@ -1,5 +1,5 @@ /* This file is part of Eclat. - Copyright (C) 2012-2015 Sergey Poznyakoff. + Copyright (C) 2012-2018 Sergey Poznyakoff. Eclat is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -979,10 +979,10 @@ func_sort(forlan_eval_env_t env, struct grecs_list *list) forlan_compar = forlan_compar_string; forlan_sort_reverse = 0; - if (ep = list->head->next) { + if ((ep = list->head->next)) { t = ep->data; forlan_sort_key = t->v.string; - if (ep = ep->next) { + if ((ep = ep->next)) { char *p; t = ep->data; diff --git a/lib/forlangrm.y b/lib/forlangrm.y index 2db1274..9d44ec9 100644 --- a/lib/forlangrm.y +++ b/lib/forlangrm.y @@ -23,7 +23,7 @@ #include <string.h> int yylex(); -static int yyerror(char *); +static int yyerror(char const *); union forlan_node *forlan_parse_tree; size_t forlan_variable_count; static struct grecs_symtab *forlan_symtab; @@ -371,7 +371,7 @@ stmt_asgn : IDENT '=' node ';' ; %% static int -yyerror(char *s) +yyerror(char const *s) { grecs_error(&yylloc, 0, "%s", s); return 0; diff --git a/lib/forlanlex.l b/lib/forlanlex.l index 62265cb..0fc469e 100644 --- a/lib/forlanlex.l +++ b/lib/forlanlex.l @@ -56,6 +56,7 @@ static int yywrap(void); %} +%option noinput %option nounput WS [ \t\f][ \t\f]* diff --git a/lib/ldapmap.c b/lib/ldapmap.c index 61cdf87..09b0689 100644 --- a/lib/ldapmap.c +++ b/lib/ldapmap.c @@ -1,5 +1,5 @@ /* This file is part of Eclat. - Copyright (C) 2012-2015 Sergey Poznyakoff. + Copyright (C) 2012-2018 Sergey Poznyakoff. Eclat is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,6 +21,7 @@ #include <sysexits.h> #include <signal.h> #include <pwd.h> +#include <unistd.h> enum { tls_no, tls_yes, tls_only }; diff --git a/src/ispeek.c b/src/ispeek.c index 9e4f8e3..82837c6 100644 --- a/src/ispeek.c +++ b/src/ispeek.c @@ -146,7 +146,7 @@ print_file(const char *path, struct closure *cl) die(EX_DATAERR, "%s: %s", str, json_err_diag); } - while (key = *argv++) { + while ((key = *argv++)) { struct json_value *p; char *s; @@ -78,7 +78,7 @@ translate_ids(int argc, char **argv, const char *mapname) char * eclat_stpcpy(char *p, char *q) { - while (*p = *q++) + while ((*p = *q++)) ++p; return p; } @@ -232,7 +232,6 @@ eclat_send_request(struct ec2_request *orig, struct grecs_node **ret_tree) time_t endtime; unsigned long tts, t; struct grecs_node *xmltree = NULL; - void *sim; endtime = time(NULL) + max_retry_time; tts = 2; @@ -447,7 +446,7 @@ read_file(const char *file) char inbuf[4096]; size_t n; - while (n = fread(inbuf, 1, sizeof(inbuf), stdin)) + while ((n = fread(inbuf, 1, sizeof(inbuf), stdin)) > 0) grecs_txtacc_grow(acc, inbuf, n); grecs_txtacc_grow_char(acc, 0); if (ferror(stdin)) |