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