Skip to content

Commit 2902b79

Browse files
committed
lint
1 parent cc0ed83 commit 2902b79

File tree

4 files changed

+30
-28
lines changed

4 files changed

+30
-28
lines changed

runtime/auth/aws-signing-common/common/src/aws/smithy/kotlin/runtime/auth/awssigning/AuthTokenGenerator.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
/*
2-
<<<<<<< HEAD
3-
=======
42
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
53
* SPDX-License-Identifier: Apache-2.0
64
*/
75

8-
/*
9-
>>>>>>> origin/main
10-
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
11-
* SPDX-License-Identifier: Apache-2.0
12-
*/
136
package aws.smithy.kotlin.runtime.auth.awssigning
147

158
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
16-
import aws.smithy.kotlin.runtime.auth.awssigning.AwsSigningConfig.Companion.invoke
179
import aws.smithy.kotlin.runtime.http.Headers
1810
import aws.smithy.kotlin.runtime.http.HttpMethod
1911
import aws.smithy.kotlin.runtime.http.request.HttpRequest

runtime/runtime-core/build.gradle.kts

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,19 @@ kotlin {
7979
Files.writeString(
8080
defPath.get().asFile.toPath(),
8181
"""
82-
package = aws.smithy.kotlin.native.winver
83-
headers = windows.h
84-
compilerOpts = \
85-
-DUNICODE \
86-
-DWINVER=0x0601 \
87-
-D_WIN32_WINNT=0x0601 \
88-
-DWINAPI_FAMILY=3 \
89-
-DOEMRESOURCE \
90-
-Wno-incompatible-pointer-types \
91-
-Wno-deprecated-declarations
92-
libraryPaths = $mingwLibs
93-
staticLibraries = libversion.a
94-
""".trimIndent(),
82+
package = aws.smithy.kotlin.native.winver
83+
headers = windows.h
84+
compilerOpts = \
85+
-DUNICODE \
86+
-DWINVER=0x0601 \
87+
-D_WIN32_WINNT=0x0601 \
88+
-DWINAPI_FAMILY=3 \
89+
-DOEMRESOURCE \
90+
-Wno-incompatible-pointer-types \
91+
-Wno-deprecated-declarations
92+
libraryPaths = $mingwLibs
93+
staticLibraries = libversion.a
94+
""".trimIndent(),
9595
)
9696
}
9797
}
@@ -113,13 +113,14 @@ kotlin {
113113
"-v",
114114
)
115115
compilerOptions.freeCompilerArgs.addAll(compilerArgs)
116-
117116
}
118117
}
119118
}
120119

121120
private fun findMingwHome(): String =
122-
System.getenv("MINGW_PREFIX")?.takeUnless { it.isBlank() } ?:
123-
typedProp("mingw.prefix") ?:
124-
throw IllegalStateException("Cannot determine MinGW prefix location. Please verify MinGW is installed correctly " +
125-
"and that either the `MINGW_PREFIX` environment variable or the `mingw.prefix` Gradle property is set.")
121+
System.getenv("MINGW_PREFIX")?.takeUnless { it.isBlank() }
122+
?: typedProp("mingw.prefix")
123+
?: throw IllegalStateException(
124+
"Cannot determine MinGW prefix location. Please verify MinGW is installed correctly " +
125+
"and that either the `MINGW_PREFIX` environment variable or the `mingw.prefix` Gradle property is set.",
126+
)

runtime/runtime-core/mingw/src/aws/smithy/kotlin/runtime/net/DefaultHostResolverMingw.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
package aws.smithy.kotlin.runtime.net
27

38
import kotlinx.cinterop.UnsafeNumber
@@ -40,7 +45,6 @@ internal actual object DefaultHostResolver : HostResolver {
4045
check(wsaResult == 0) { "Failed to initialize Windows Sockets (error code $wsaResult)" }
4146

4247
try {
43-
4448
val hints = alloc<addrinfo>().apply {
4549
ai_family = AF_UNSPEC // Allow both IPv4 and IPv6
4650
ai_socktype = SOCK_STREAM // TCP stream sockets

runtime/runtime-core/mingw/src/aws/smithy/kotlin/runtime/util/SystemDefaultProviderMingw.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
package aws.smithy.kotlin.runtime.util
27

8+
import aws.smithy.kotlin.native.winver.*
39
import kotlinx.cinterop.*
410
import platform.posix.environ
511
import platform.posix.memcpy
6-
import aws.smithy.kotlin.native.winver.*
712

813
internal actual val rawEnvironmentVariables: CPointer<CPointerVarOf<CPointer<ByteVarOf<Byte>>>>? = environ
914

0 commit comments

Comments
 (0)