Fix or ignore unawaited_futures in new code.

Change-Id: I8bfa7c8094b81f2eaa42be70b11f46b8fa73160f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241320
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/analyzer/lib/src/summary2/kernel_compilation_service.dart b/pkg/analyzer/lib/src/summary2/kernel_compilation_service.dart
index 03fb020..e7ed68c 100644
--- a/pkg/analyzer/lib/src/summary2/kernel_compilation_service.dart
+++ b/pkg/analyzer/lib/src/summary2/kernel_compilation_service.dart
@@ -57,6 +57,7 @@
     ]);
 
     // When the process exits, we should not try to continue using it.
+    // ignore: unawaited_futures
     process.exitCode.then((_) {
       _currentInstance = null;
     });
@@ -127,8 +128,12 @@
       final instance = _currentInstance;
       if (instance != null) {
         _currentInstance = null;
+        // We don't expect any answer, the process will stop.
+        // ignore: unawaited_futures
         instance.requestChannel.sendRequest<void>('exit', {});
         instance.socket.destroy();
+        // This socket is bound to a fresh port, we don't need it.
+        // ignore: unawaited_futures
         instance.serverSocket.close();
         instance.process.kill();
       }
diff --git a/pkg/analyzer/test/src/summary/elements_base.dart b/pkg/analyzer/test/src/summary/elements_base.dart
index c4cb223..83d47b0 100644
--- a/pkg/analyzer/test/src/summary/elements_base.dart
+++ b/pkg/analyzer/test/src/summary/elements_base.dart
@@ -365,7 +365,7 @@
         }
       }
 
-      link(
+      await link(
         elementFactory,
         cycleInputLibraries,
         macroExecutor: macroExecutor,