From 24193d03d7936c653a72b378c35710933bba0f40 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Mon, 11 Nov 2019 01:20:43 +0100 Subject: [PATCH] Print "multiple libraries found for header.h" message only when it really happens. --- legacy/builder/print_used_and_not_used_libraries.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/legacy/builder/print_used_and_not_used_libraries.go b/legacy/builder/print_used_and_not_used_libraries.go index 81ab07ee095..d4922355b43 100644 --- a/legacy/builder/print_used_and_not_used_libraries.go +++ b/legacy/builder/print_used_and_not_used_libraries.go @@ -58,6 +58,9 @@ func (s *PrintUsedAndNotUsedLibraries) Run(ctx *types.Context) error { libraryResolutionResults := ctx.LibrariesResolutionResults for header, libResResult := range libraryResolutionResults { + if len(libResResult.NotUsedLibraries) == 0 { + continue + } logger.Fprintln(os.Stdout, logLevel, constants.MSG_LIBRARIES_MULTIPLE_LIBS_FOUND_FOR, header) logger.Fprintln(os.Stdout, logLevel, constants.MSG_LIBRARIES_USED, libResResult.Library.InstallDir) for _, notUsedLibrary := range libResResult.NotUsedLibraries {