From 14b366e57a904c2c0d04804f15d8daf755f14541 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 30 Nov 2018 09:23:42 +0200 Subject: loplugin:singlevalfields Change-Id: I70dc861573fd1b3d799c88aa2a6d9a3eda0e2a43 Reviewed-on: https://gerrit.libreoffice.org/64327 Tested-by: Jenkins Reviewed-by: Noel Grandin --- soltools/mkdepend/def.h | 2 -- soltools/mkdepend/include.c | 10 ++++------ 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'soltools') diff --git a/soltools/mkdepend/def.h b/soltools/mkdepend/def.h index a452fd71f0e1..bd06c5f01378 100644 --- a/soltools/mkdepend/def.h +++ b/soltools/mkdepend/def.h @@ -116,8 +116,6 @@ struct inclist { boolean i_notified; /* whether we have revealed includes */ boolean i_marked; /* whether it's in the makefile */ boolean i_searched; /* whether we have read this */ - boolean i_included_sym; /* whether #include SYMBOL was found */ - /* Can't use i_list if TRUE */ }; struct filepointer { diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c index f47b9d8efeab..b7a5df1caae8 100644 --- a/soltools/mkdepend/include.c +++ b/soltools/mkdepend/include.c @@ -56,7 +56,7 @@ struct inclist *inc_path(char *file, char *include, boolean dot, struct Includes * has already been expanded. */ for (ip = inclist; ip->i_file; ip++) - if ((strcmp(ip->i_incstring, include) == 0) && !ip->i_included_sym) + if (strcmp(ip->i_incstring, include) == 0) { found = TRUE; break; @@ -284,7 +284,6 @@ struct inclist *newinclude(char const *newfile, char const *incstring) if (inclistp == inclist + MAXFILES - 1) fatalerr("out of space: increase MAXFILES\n"); ip->i_file = copy(newfile); - ip->i_included_sym = FALSE; if (incstring == NULL) ip->i_incstring = ip->i_file; else @@ -312,10 +311,9 @@ void included_by(struct inclist *ip, struct inclist *newfile) for (i=0; ii_listlen; i++) if (ip->i_list[ i ] == newfile) { i = (int)strlen(newfile->i_file); - if (!ip->i_included_sym && - !(i > 2 && - newfile->i_file[i-1] == 'c' && - newfile->i_file[i-2] == '.')) + if (!(i > 2 && + newfile->i_file[i-1] == 'c' && + newfile->i_file[i-2] == '.')) { /* only complain if ip has */ /* no #include SYMBOL lines */ -- cgit