@@ -355,8 +355,8 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
355
355
}
356
356
}
357
357
358
- var preproc_err error
359
- var preproc_stderr []byte
358
+ var preprocErr error
359
+ var preprocStderr []byte
360
360
361
361
var include string
362
362
if unchanged && cache .valid {
@@ -365,21 +365,21 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
365
365
ctx .Info (tr ("Using cached library dependencies for file: %[1]s" , sourcePath ))
366
366
}
367
367
} else {
368
- var preproc_stdout []byte
369
- preproc_stdout , preproc_stderr , preproc_err = preprocessor .GCC (sourcePath , targetFilePath , includeFolders , ctx .BuildProperties )
368
+ var preprocStdout []byte
369
+ preprocStdout , preprocStderr , preprocErr = preprocessor .GCC (sourcePath , targetFilePath , includeFolders , ctx .BuildProperties )
370
370
if ctx .Verbose {
371
- ctx .WriteStdout (preproc_stdout )
372
- ctx .WriteStdout (preproc_stderr )
371
+ ctx .WriteStdout (preprocStdout )
372
+ ctx .WriteStdout (preprocStderr )
373
373
}
374
374
// Unwrap error and see if it is an ExitError.
375
- if preproc_err == nil {
375
+ if preprocErr == nil {
376
376
// Preprocessor successful, done
377
377
include = ""
378
- } else if _ , isExitErr := errors .Cause (preproc_err ).(* exec.ExitError ); ! isExitErr || preproc_stderr == nil {
378
+ } else if _ , isExitErr := errors .Cause (preprocErr ).(* exec.ExitError ); ! isExitErr || preprocStderr == nil {
379
379
// Ignore ExitErrors (e.g. gcc returning non-zero status), but bail out on other errors
380
- return errors .WithStack (preproc_err )
380
+ return errors .WithStack (preprocErr )
381
381
} else {
382
- include = IncludesFinderWithRegExp (string (preproc_stderr ))
382
+ include = IncludesFinderWithRegExp (string (preprocStderr ))
383
383
if include == "" && ctx .Verbose {
384
384
ctx .Info (tr ("Error while detecting libraries included by %[1]s" , sourcePath ))
385
385
}
@@ -395,23 +395,23 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
395
395
library := ResolveLibrary (ctx , include )
396
396
if library == nil {
397
397
// Library could not be resolved, show error
398
- if preproc_err == nil || preproc_stderr == nil {
398
+ if preprocErr == nil || preprocStderr == nil {
399
399
// Filename came from cache, so run preprocessor to obtain error to show
400
- var preproc_stdout []byte
401
- preproc_stdout , preproc_stderr , preproc_err = preprocessor .GCC (sourcePath , targetFilePath , includeFolders , ctx .BuildProperties )
400
+ var preprocStdout []byte
401
+ preprocStdout , preprocStderr , preprocErr = preprocessor .GCC (sourcePath , targetFilePath , includeFolders , ctx .BuildProperties )
402
402
if ctx .Verbose {
403
- ctx .WriteStdout (preproc_stdout )
403
+ ctx .WriteStdout (preprocStdout )
404
404
}
405
- if preproc_err == nil {
405
+ if preprocErr == nil {
406
406
// If there is a missing #include in the cache, but running
407
407
// gcc does not reproduce that, there is something wrong.
408
408
// Returning an error here will cause the cache to be
409
409
// deleted, so hopefully the next compilation will succeed.
410
410
return errors .New (tr ("Internal error in cache" ))
411
411
}
412
412
}
413
- ctx .WriteStderr (preproc_stderr )
414
- return errors .WithStack (preproc_err )
413
+ ctx .WriteStderr (preprocStderr )
414
+ return errors .WithStack (preprocErr )
415
415
}
416
416
417
417
// Add this library to the list of libraries, the
0 commit comments