liquid_feedback_core

changeset 624:82387194519b tip

Added code to suppress compiler warning (writing one byte into region of size 0)
author jbe
date Fri Feb 05 13:50:45 2021 +0100 (5 months ago)
parents 8dc9b96cc5db
children
files lf_update.c lf_update_issue_order.c lf_update_suggestion_order.c
line diff
     1.1 --- a/lf_update.c	Fri Feb 05 13:31:28 2021 +0100
     1.2 +++ b/lf_update.c	Fri Feb 05 13:50:45 2021 +0100
     1.3 @@ -76,6 +76,7 @@
     1.4        }
     1.5        len += seglen;
     1.6      }
     1.7 +    if (!len) len = 1;  // not needed but suppresses compiler warning
     1.8      conninfo = malloc(len * sizeof(char));
     1.9      if (!conninfo) {
    1.10        fprintf(stderr, "Error: Could not allocate memory for conninfo string\n");
     2.1 --- a/lf_update_issue_order.c	Fri Feb 05 13:31:28 2021 +0100
     2.2 +++ b/lf_update_issue_order.c	Fri Feb 05 13:50:45 2021 +0100
     2.3 @@ -417,6 +417,7 @@
     2.4        logging = 1;
     2.5      }
     2.6      for (i=argb; i<argc; i++) len += strlen(argv[i]) + 1;
     2.7 +    if (!len) len = 1;  // not needed but suppresses compiler warning
     2.8      conninfo = malloc(len * sizeof(char));
     2.9      if (!conninfo) {
    2.10        fprintf(stderr, "Error: Could not allocate memory for conninfo string.\n");
     3.1 --- a/lf_update_suggestion_order.c	Fri Feb 05 13:31:28 2021 +0100
     3.2 +++ b/lf_update_suggestion_order.c	Fri Feb 05 13:50:45 2021 +0100
     3.3 @@ -474,6 +474,7 @@
     3.4        logging = 1;
     3.5      }
     3.6      for (i=argb; i<argc; i++) len += strlen(argv[i]) + 1;
     3.7 +    if (!len) len = 1;  // not needed but suppresses compiler warning
     3.8      conninfo = malloc(len * sizeof(char));
     3.9      if (!conninfo) {
    3.10        fprintf(stderr, "Error: Could not allocate memory for conninfo string.\n");

Impressum / About Us