@@ -332,8 +332,8 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
332
332
}
333
333
}
334
334
335
- var preproc_err error
336
- var preproc_stderr []byte
335
+ var preprocErr error
336
+ var preprocStderr []byte
337
337
338
338
var include string
339
339
if unchanged && cache .valid {
@@ -342,16 +342,16 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
342
342
ctx .Info (tr ("Using cached library dependencies for file: %[1]s" , sourcePath ))
343
343
}
344
344
} else {
345
- preproc_stderr , preproc_err = GCCPreprocRunnerForDiscoveringIncludes (ctx , sourcePath , targetFilePath , includeFolders )
345
+ preprocStderr , preprocErr = GCCPreprocRunnerForDiscoveringIncludes (ctx , sourcePath , targetFilePath , includeFolders )
346
346
// Unwrap error and see if it is an ExitError.
347
- if preproc_err == nil {
347
+ if preprocErr == nil {
348
348
// Preprocessor successful, done
349
349
include = ""
350
- } else if _ , isExitErr := errors .Cause (preproc_err ).(* exec.ExitError ); ! isExitErr || preproc_stderr == nil {
350
+ } else if _ , isExitErr := errors .Cause (preprocErr ).(* exec.ExitError ); ! isExitErr || preprocStderr == nil {
351
351
// Ignore ExitErrors (e.g. gcc returning non-zero status), but bail out on other errors
352
- return errors .WithStack (preproc_err )
352
+ return errors .WithStack (preprocErr )
353
353
} else {
354
- include = IncludesFinderWithRegExp (string (preproc_stderr ))
354
+ include = IncludesFinderWithRegExp (string (preprocStderr ))
355
355
if include == "" && ctx .Verbose {
356
356
ctx .Info (tr ("Error while detecting libraries included by %[1]s" , sourcePath ))
357
357
}
@@ -369,19 +369,19 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
369
369
// Library could not be resolved, show error
370
370
// err := runCommand(ctx, &GCCPreprocRunner{SourceFilePath: sourcePath, TargetFileName: paths.New(constants.FILE_CTAGS_TARGET_FOR_GCC_MINUS_E), Includes: includes})
371
371
// return errors.WithStack(err)
372
- if preproc_err == nil || preproc_stderr == nil {
372
+ if preprocErr == nil || preprocStderr == nil {
373
373
// Filename came from cache, so run preprocessor to obtain error to show
374
- preproc_stderr , preproc_err = GCCPreprocRunnerForDiscoveringIncludes (ctx , sourcePath , targetFilePath , includeFolders )
375
- if preproc_err == nil {
374
+ preprocStderr , preprocErr = GCCPreprocRunnerForDiscoveringIncludes (ctx , sourcePath , targetFilePath , includeFolders )
375
+ if preprocErr == nil {
376
376
// If there is a missing #include in the cache, but running
377
377
// gcc does not reproduce that, there is something wrong.
378
378
// Returning an error here will cause the cache to be
379
379
// deleted, so hopefully the next compilation will succeed.
380
380
return errors .New (tr ("Internal error in cache" ))
381
381
}
382
382
}
383
- ctx .Stderr .Write (preproc_stderr )
384
- return errors .WithStack (preproc_err )
383
+ ctx .Stderr .Write (preprocStderr )
384
+ return errors .WithStack (preprocErr )
385
385
}
386
386
387
387
// Add this library to the list of libraries, the
0 commit comments