From 893a5ce1f75e5eea7c8d383038ff92a150819c9c Mon Sep 17 00:00:00 2001 From: Ralph Little Date: Thu, 19 Sep 2019 22:02:33 -0700 Subject: [PATCH] xsane-*-project.c - reduced snprintf format pad to silence warning about too long constrant string for buffer. --- src/xsane-email-project.c | 4 ++-- src/xsane-fax-project.c | 4 ++-- src/xsane-multipage-project.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xsane-email-project.c b/src/xsane-email-project.c index f20cb12..ac93fc2 100644 --- a/src/xsane-email-project.c +++ b/src/xsane-email-project.c @@ -896,7 +896,7 @@ static void xsane_email_project_update_project_status() snprintf(filename, sizeof(filename), "%s/xsane-mail-list", preferences.email_project); projectfile = fopen(filename, "r+b"); /* r+ = read and write, position = start of file */ - snprintf(buf, 32, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.email_status); /* fill 32 characters status line */ + snprintf(buf, 33, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.email_status); /* fill 32 characters status line */ fprintf(projectfile, "%s\n", buf); /* first line is status of email */ fclose(projectfile); @@ -936,7 +936,7 @@ void xsane_email_project_save() { char buf[TEXTBUFSIZE]; - snprintf(buf, 32, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.email_status); /* fill 32 characters status line */ + snprintf(buf, 33, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.email_status); /* fill 32 characters status line */ fprintf(projectfile, "%s\n", buf); /* first line is status of email */ gtk_progress_set_format_string(GTK_PROGRESS(xsane.project_progress_bar), _(xsane.email_status)); xsane_progress_bar_set_fraction(GTK_PROGRESS_BAR(xsane.project_progress_bar), 0.0); diff --git a/src/xsane-fax-project.c b/src/xsane-fax-project.c index f263313..0c60a97 100644 --- a/src/xsane-fax-project.c +++ b/src/xsane-fax-project.c @@ -452,7 +452,7 @@ static void xsane_fax_project_update_project_status() snprintf(filename, sizeof(filename), "%s/xsane-fax-list", preferences.fax_project); projectfile = fopen(filename, "r+b"); /* r+ = read and write, position = start of file */ - snprintf(buf, 32, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.fax_status); /* fill 32 characters status line */ + snprintf(buf, 33, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.fax_status); /* fill 32 characters status line */ fprintf(projectfile, "%s\n", buf); /* first line is status of mail */ fclose(projectfile); @@ -498,7 +498,7 @@ void xsane_fax_project_save() { char buf[TEXTBUFSIZE]; - snprintf(buf, 32, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.fax_status); /* fill 32 characters status line */ + snprintf(buf, 33, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.fax_status); /* fill 32 characters status line */ fprintf(projectfile, "%s\n", buf); /* first line is status of mail */ gtk_progress_set_format_string(GTK_PROGRESS(xsane.project_progress_bar), _(xsane.fax_status)); xsane_progress_bar_set_fraction(GTK_PROGRESS_BAR(xsane.project_progress_bar), 0.0); diff --git a/src/xsane-multipage-project.c b/src/xsane-multipage-project.c index f23e5f8..9392e00 100644 --- a/src/xsane-multipage-project.c +++ b/src/xsane-multipage-project.c @@ -522,7 +522,7 @@ void xsane_multipage_project_save() { char buf[TEXTBUFSIZE]; - snprintf(buf, 32, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.multipage_status); /* fill 32 characters status line */ + snprintf(buf, 33, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.multipage_status); /* fill 32 characters status line */ fprintf(projectfile, "%s\n", buf); /* first line is status of multipage */ gtk_progress_set_format_string(GTK_PROGRESS(xsane.project_progress_bar), _(xsane.multipage_status)); xsane_progress_bar_set_fraction(GTK_PROGRESS_BAR(xsane.project_progress_bar), 0.0); -- 2.23.0 resh.scm (update-package): Remove iteration over the result of 'changed-inputs'. * guix/import/test.scm (available-updates): Add support for input lists. * tests/guix-refresh.sh (GUIX_TEST_UPDATER_TARGETS): Add input list for "the-test-package". Make sure 'guix refresh -u' updates 'inputs' accordingly. * doc/guix.texi (Invoking guix refresh): Mention it. Ludovic Courtès 2023-04-21tests: Relax two tests that expected a non-zero error code....* tests/guix-package-aliases.sh: "guix upgrade foo bar" has always returned zero; adjust accordingly. * tests/guix-refresh.sh: "guix refresh -t test idutils" and similar return zero; adjust accordingly. Ludovic Courtès 2023-04-21tests: Fix checks for expected failures....Addresses <https://issues.guix.gnu.org/62406>. With 'set -e', a return status inverted with '!' does not cause the shell to exit immediately. Instead use '&& false' to indicate an expected failure. * tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-environment-container.sh, tests/guix-environment.sh, tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix-graph.sh, tests/guix-hash.sh, tests/guix-home.sh, tests/guix-pack-relocatable.sh, tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix-package-net.sh, tests/guix-package.sh, tests/guix-refresh.sh, tests/guix-shell.sh, tests/guix-style.sh, tests/guix-system.sh: Replace uses of '! ...' with '... && false' or `test ! ...` as appropriate. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Eric Bavier 2023-01-25tests: Do not try to create "$HOME/.config"....Previously this test would fail when HOME=/homeless-shelter and said directory cannot be created. * tests/guix-refresh.sh: Pass '--keyring' together with '-u'. Ludovic Courtès 2023-01-08refresh: Add CLI tests....* guix/import/test.scm, tests/guix-refresh.sh: New files. * Makefile.am (MODULES, SH_TESTS): Add them. Ludovic Courtès