Skip to content

Commit 9b7b9d2

Browse files
committed
Remove useless targetFilePath variable
1 parent 97451d8 commit 9b7b9d2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/arduino/builder/internal/detector/detector.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ func (l *SketchLibrariesDetector) findMissingIncludesInCompilationUnit(
321321
) error {
322322
sourceFile := sourceFileQueue.Pop()
323323
sourcePath := sourceFile.SourcePath()
324-
targetFilePath := paths.NullPath()
325324
depPath := sourceFile.DepfilePath()
326325
objPath := sourceFile.ObjectPath()
327326

@@ -366,7 +365,7 @@ func (l *SketchLibrariesDetector) findMissingIncludesInCompilationUnit(
366365
}
367366
first = false
368367
} else {
369-
preprocResult, preprocErr = preprocessor.GCC(ctx, sourcePath, targetFilePath, includeFolders, buildProperties)
368+
preprocResult, preprocErr = preprocessor.GCC(ctx, sourcePath, paths.NullPath(), includeFolders, buildProperties)
370369
if l.logger.VerbosityLevel() == logger.VerbosityVerbose {
371370
l.logger.WriteStdout(preprocResult.Stdout)
372371
}
@@ -399,7 +398,7 @@ func (l *SketchLibrariesDetector) findMissingIncludesInCompilationUnit(
399398

400399
// If preprocess result came from cache, run the preprocessor to obtain the actual error to show
401400
if preprocErr == nil || len(preprocResult.Stderr) == 0 {
402-
preprocResult, preprocErr = preprocessor.GCC(ctx, sourcePath, targetFilePath, includeFolders, buildProperties)
401+
preprocResult, preprocErr = preprocessor.GCC(ctx, sourcePath, paths.NullPath(), includeFolders, buildProperties)
403402
if l.logger.VerbosityLevel() == logger.VerbosityVerbose {
404403
l.logger.WriteStdout(preprocResult.Stdout)
405404
}

0 commit comments

Comments
 (0)