Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8131a24

Browse files
committedJun 6, 2023
Rename variable 'include' -> 'missingIncludeH'
1 parent a2faa07 commit 8131a24

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
 

‎legacy/builder/container_find_includes.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
342342

343343
first := true
344344
for {
345-
var include string
345+
var missingIncludeH string
346346
cache.ExpectFile(sourcePath)
347347

348348
includeFolders := ctx.IncludeFolders
@@ -365,7 +365,7 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
365365
var preprocStderr []byte
366366

367367
if unchanged && cache.valid {
368-
include = cache.Next().Include
368+
missingIncludeH = cache.Next().Include
369369
if first && ctx.Verbose {
370370
ctx.Info(tr("Using cached library dependencies for file: %[1]s", sourcePath))
371371
}
@@ -380,27 +380,27 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
380380
_, isExitErr := errors.Cause(preprocErr).(*exec.ExitError)
381381
if preprocErr == nil {
382382
// Preprocessor successful, done
383-
include = ""
383+
missingIncludeH = ""
384384
} else if !isExitErr || preprocStderr == nil {
385385
// Ignore ExitErrors (e.g. gcc returning
386386
// non-zero status), but bail out on
387387
// other errors
388388
return errors.WithStack(preprocErr)
389389
} else {
390-
include = IncludesFinderWithRegExp(string(preprocStderr))
391-
if include == "" && ctx.Verbose {
390+
missingIncludeH = IncludesFinderWithRegExp(string(preprocStderr))
391+
if missingIncludeH == "" && ctx.Verbose {
392392
ctx.Info(tr("Error while detecting libraries included by %[1]s", sourcePath))
393393
}
394394
}
395395
}
396396

397-
if include == "" {
397+
if missingIncludeH == "" {
398398
// No missing includes found, we're done
399399
cache.ExpectEntry(sourcePath, "", nil)
400400
return nil
401401
}
402402

403-
library := ResolveLibrary(ctx, include)
403+
library := ResolveLibrary(ctx, missingIncludeH)
404404
if library == nil {
405405
// Library could not be resolved, show error
406406
if preprocErr == nil || preprocStderr == nil {
@@ -426,7 +426,7 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
426426
// include path and queue its source files for further
427427
// include scanning
428428
ctx.ImportedLibraries = append(ctx.ImportedLibraries, library)
429-
appendIncludeFolder(ctx, cache, sourcePath, include, library.SourceDir)
429+
appendIncludeFolder(ctx, cache, sourcePath, missingIncludeH, library.SourceDir)
430430
sourceDirs := library.SourceDirs()
431431
for _, sourceDir := range sourceDirs {
432432
queueSourceFilesFromFolder(ctx, sourceFileQueue, library, sourceDir.Dir, sourceDir.Recurse)

0 commit comments

Comments
 (0)
Please sign in to comment.