loplugin:singlevalfields
Change-Id: I70dc861573fd1b3d799c88aa2a6d9a3eda0e2a43 Reviewed-on: https://gerrit.libreoffice.org/64327 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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; i<ip->i_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 */
|
||||
|
||||
Reference in New Issue
Block a user