diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-24 09:08:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-11 13:25:31 +0100 |
commit | 0d1253c2328106a443d16b6c8e96347de33e2ace (patch) | |
tree | e26e7ca9f9b91f50573f446b8a93515f4c4302eb /soltools | |
parent | 2dd7aba7564a222c2acbac22975a76a6ab33c41f (diff) |
new loplugin writeonlyvars
largely based on the relevant portion of the unusedfields loplugin, but
adapted for local vars
Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1
Reviewed-on: https://gerrit.libreoffice.org/66835
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'soltools')
-rw-r--r-- | soltools/mkdepend/main.c | 7 | ||||
-rw-r--r-- | soltools/mkdepend/pr.c | 4 |
2 files changed, 2 insertions, 9 deletions
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c index ee1cfb8efc7d..844edb390ad2 100644 --- a/soltools/mkdepend/main.c +++ b/soltools/mkdepend/main.c @@ -127,8 +127,6 @@ char *includedirs[ MAXDIRS + 1 ]; char *objprefix = ""; char *objsuffix = OBJSUFFIX; static char *startat = "# DO NOT DELETE"; -static int width = 78; -static boolean append = FALSE; boolean printed = FALSE; boolean verbose = FALSE; boolean show_where_not = FALSE; @@ -274,16 +272,13 @@ int main(int argc, char **argv) /* do not use if endmarker processing */ case 'a': if (endmarker) break; - append = TRUE; break; case 'w': if (endmarker) break; if (argv[0][2] == '\0') { argv++; argc--; - width = atoi(argv[0]); - } else - width = atoi(argv[0]+2); + } break; case 'n': // Use "-n" switch to generate dependencies with windows-native slash style diff --git a/soltools/mkdepend/pr.c b/soltools/mkdepend/pr.c index 731b2f16626e..2b0825221df6 100644 --- a/soltools/mkdepend/pr.c +++ b/soltools/mkdepend/pr.c @@ -109,7 +109,6 @@ size_t pr(struct inclist *ip, char *file, char *base) { size_t ret; static char *lastfile; - static int current_len; int len, i; char buf[ BUFSIZ ]; @@ -119,7 +118,7 @@ size_t pr(struct inclist *ip, char *file, char *base) lastfile = file; sprintf(buf, "\n%s%s%s: \\\n %s", objprefix, base, objsuffix, ip->i_file); - len = current_len = (int)strlen(buf); + len = (int)strlen(buf); } else { buf[0] = ' '; @@ -127,7 +126,6 @@ size_t pr(struct inclist *ip, char *file, char *base) buf[2] = '\n'; buf[3] = ' '; strcpy(buf+4, ip->i_file); - current_len += len; } ret = fwrite(buf, len, 1, stdout); |