Skip to content

Commit 641dd6f

Browse files
committed
Rename variable 'include' -> 'missingIncludeH'
1 parent f57ac04 commit 641dd6f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

legacy/builder/container_find_includes.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,9 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
358358
var preprocErr error
359359
var preprocStderr []byte
360360

361-
var include string
361+
var missingIncludeH string
362362
if unchanged && cache.valid {
363-
include = cache.Next().Include
363+
missingIncludeH = cache.Next().Include
364364
if first && ctx.Verbose {
365365
ctx.Info(tr("Using cached library dependencies for file: %[1]s", sourcePath))
366366
}
@@ -374,25 +374,25 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
374374
// Unwrap error and see if it is an ExitError.
375375
if preprocErr == nil {
376376
// Preprocessor successful, done
377-
include = ""
377+
missingIncludeH = ""
378378
} else if _, isExitErr := errors.Cause(preprocErr).(*exec.ExitError); !isExitErr || preprocStderr == nil {
379379
// Ignore ExitErrors (e.g. gcc returning non-zero status), but bail out on other errors
380380
return errors.WithStack(preprocErr)
381381
} else {
382-
include = IncludesFinderWithRegExp(string(preprocStderr))
383-
if include == "" && ctx.Verbose {
382+
missingIncludeH = IncludesFinderWithRegExp(string(preprocStderr))
383+
if missingIncludeH == "" && ctx.Verbose {
384384
ctx.Info(tr("Error while detecting libraries included by %[1]s", sourcePath))
385385
}
386386
}
387387
}
388388

389-
if include == "" {
389+
if missingIncludeH == "" {
390390
// No missing includes found, we're done
391391
cache.ExpectEntry(sourcePath, "", nil)
392392
return nil
393393
}
394394

395-
library := ResolveLibrary(ctx, include)
395+
library := ResolveLibrary(ctx, missingIncludeH)
396396
if library == nil {
397397
// Library could not be resolved, show error
398398
if preprocErr == nil || preprocStderr == nil {
@@ -418,7 +418,7 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
418418
// include path and queue its source files for further
419419
// include scanning
420420
ctx.ImportedLibraries = append(ctx.ImportedLibraries, library)
421-
appendIncludeFolder(ctx, cache, sourcePath, include, library.SourceDir)
421+
appendIncludeFolder(ctx, cache, sourcePath, missingIncludeH, library.SourceDir)
422422
sourceDirs := library.SourceDirs()
423423
for _, sourceDir := range sourceDirs {
424424
queueSourceFilesFromFolder(ctx, sourceFileQueue, library, sourceDir.Dir, sourceDir.Recurse)

0 commit comments

Comments
 (0)