Skip to content

Commit ea3bac7

Browse files
committed
Fix MSVC compiler warnings in code generator
1 parent e836d8f commit ea3bac7

File tree

6 files changed

+85
-3
lines changed

6 files changed

+85
-3
lines changed

eventstream_rpc/tests/EchoTestRpcModel.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,8 @@ namespace Awstest
937937
Aws::Crt::StringView stringView,
938938
Aws::Crt::Allocator *allocator) const noexcept
939939
{
940+
(void)stringView;
941+
(void)allocator;
940942
return nullptr;
941943
}
942944

@@ -1002,6 +1004,8 @@ namespace Awstest
10021004
Aws::Crt::StringView stringView,
10031005
Aws::Crt::Allocator *allocator) const noexcept
10041006
{
1007+
(void)stringView;
1008+
(void)allocator;
10051009
return nullptr;
10061010
}
10071011

@@ -1236,6 +1240,8 @@ namespace Awstest
12361240
Aws::Crt::StringView stringView,
12371241
Aws::Crt::Allocator *allocator) const noexcept
12381242
{
1243+
(void)stringView;
1244+
(void)allocator;
12391245
return nullptr;
12401246
}
12411247

@@ -1301,6 +1307,8 @@ namespace Awstest
13011307
Aws::Crt::StringView stringView,
13021308
Aws::Crt::Allocator *allocator) const noexcept
13031309
{
1310+
(void)stringView;
1311+
(void)allocator;
13041312
return nullptr;
13051313
}
13061314

eventstream_rpc/tests/EventStreamClientTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,8 +515,8 @@ static int s_TestStressClient(struct aws_allocator *allocator, void *ctx)
515515
return AWS_OP_SUCCESS;
516516
};
517517

518-
for (int i = 0; i < 200; i++)
519-
s_TestEchoOperation(allocator, ctx);
518+
for (int i = 0; i < 100000; i++)
519+
threadPool.AddTask(invokeOperation);
520520

521521
threadPool.BlockUntilTasksFinish();
522522

eventstream_rpc/tests/include/awstest/EchoTestRpcModel.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ namespace Awstest
488488
class GetAllProductsResult
489489
{
490490
public:
491+
GetAllProductsResult() noexcept {}
491492
GetAllProductsResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
492493
GetAllProductsResponse *GetOperationResponse() const noexcept
493494
{
@@ -541,6 +542,7 @@ namespace Awstest
541542
class CauseServiceErrorResult
542543
{
543544
public:
545+
CauseServiceErrorResult() noexcept {}
544546
CauseServiceErrorResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
545547
CauseServiceErrorResponse *GetOperationResponse() const noexcept
546548
{
@@ -623,6 +625,7 @@ namespace Awstest
623625
class CauseStreamServiceToErrorResult
624626
{
625627
public:
628+
CauseStreamServiceToErrorResult() noexcept {}
626629
CauseStreamServiceToErrorResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult))
627630
{
628631
}
@@ -701,6 +704,7 @@ namespace Awstest
701704
class EchoStreamMessagesResult
702705
{
703706
public:
707+
EchoStreamMessagesResult() noexcept {}
704708
EchoStreamMessagesResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
705709
EchoStreamingResponse *GetOperationResponse() const noexcept
706710
{
@@ -755,6 +759,7 @@ namespace Awstest
755759
class EchoMessageResult
756760
{
757761
public:
762+
EchoMessageResult() noexcept {}
758763
EchoMessageResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
759764
EchoMessageResponse *GetOperationResponse() const noexcept
760765
{
@@ -808,6 +813,7 @@ namespace Awstest
808813
class GetAllCustomersResult
809814
{
810815
public:
816+
GetAllCustomersResult() noexcept {}
811817
GetAllCustomersResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
812818
GetAllCustomersResponse *GetOperationResponse() const noexcept
813819
{

greengrass_ipc/include/aws/greengrass/GreengrassCoreIpcModel.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2359,6 +2359,7 @@ namespace Aws
23592359
class SubscribeToIoTCoreResult
23602360
{
23612361
public:
2362+
SubscribeToIoTCoreResult() noexcept {}
23622363
SubscribeToIoTCoreResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
23632364
SubscribeToIoTCoreResponse *GetOperationResponse() const noexcept
23642365
{
@@ -2413,6 +2414,7 @@ namespace Aws
24132414
class PublishToIoTCoreResult
24142415
{
24152416
public:
2417+
PublishToIoTCoreResult() noexcept {}
24162418
PublishToIoTCoreResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
24172419
PublishToIoTCoreResponse *GetOperationResponse() const noexcept
24182420
{
@@ -2502,6 +2504,7 @@ namespace Aws
25022504
class SubscribeToConfigurationUpdateResult
25032505
{
25042506
public:
2507+
SubscribeToConfigurationUpdateResult() noexcept {}
25052508
SubscribeToConfigurationUpdateResult(TaggedResult &&taggedResult) noexcept
25062509
: m_taggedResult(std::move(taggedResult))
25072510
{
@@ -2559,6 +2562,7 @@ namespace Aws
25592562
class DeleteThingShadowResult
25602563
{
25612564
public:
2565+
DeleteThingShadowResult() noexcept {}
25622566
DeleteThingShadowResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
25632567
DeleteThingShadowResponse *GetOperationResponse() const noexcept
25642568
{
@@ -2612,6 +2616,7 @@ namespace Aws
26122616
class DeferComponentUpdateResult
26132617
{
26142618
public:
2619+
DeferComponentUpdateResult() noexcept {}
26152620
DeferComponentUpdateResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult))
26162621
{
26172622
}
@@ -2697,6 +2702,7 @@ namespace Aws
26972702
class SubscribeToValidateConfigurationUpdatesResult
26982703
{
26992704
public:
2705+
SubscribeToValidateConfigurationUpdatesResult() noexcept {}
27002706
SubscribeToValidateConfigurationUpdatesResult(TaggedResult &&taggedResult) noexcept
27012707
: m_taggedResult(std::move(taggedResult))
27022708
{
@@ -2755,6 +2761,7 @@ namespace Aws
27552761
class GetConfigurationResult
27562762
{
27572763
public:
2764+
GetConfigurationResult() noexcept {}
27582765
GetConfigurationResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
27592766
GetConfigurationResponse *GetOperationResponse() const noexcept
27602767
{
@@ -2851,6 +2858,7 @@ namespace Aws
28512858
class SubscribeToTopicResult
28522859
{
28532860
public:
2861+
SubscribeToTopicResult() noexcept {}
28542862
SubscribeToTopicResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
28552863
SubscribeToTopicResponse *GetOperationResponse() const noexcept
28562864
{
@@ -2905,6 +2913,7 @@ namespace Aws
29052913
class GetComponentDetailsResult
29062914
{
29072915
public:
2916+
GetComponentDetailsResult() noexcept {}
29082917
GetComponentDetailsResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
29092918
GetComponentDetailsResponse *GetOperationResponse() const noexcept
29102919
{
@@ -2958,6 +2967,7 @@ namespace Aws
29582967
class PublishToTopicResult
29592968
{
29602969
public:
2970+
PublishToTopicResult() noexcept {}
29612971
PublishToTopicResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
29622972
PublishToTopicResponse *GetOperationResponse() const noexcept
29632973
{
@@ -3011,6 +3021,7 @@ namespace Aws
30113021
class ListComponentsResult
30123022
{
30133023
public:
3024+
ListComponentsResult() noexcept {}
30143025
ListComponentsResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
30153026
ListComponentsResponse *GetOperationResponse() const noexcept
30163027
{
@@ -3064,6 +3075,7 @@ namespace Aws
30643075
class CreateDebugPasswordResult
30653076
{
30663077
public:
3078+
CreateDebugPasswordResult() noexcept {}
30673079
CreateDebugPasswordResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
30683080
CreateDebugPasswordResponse *GetOperationResponse() const noexcept
30693081
{
@@ -3117,6 +3129,7 @@ namespace Aws
31173129
class GetThingShadowResult
31183130
{
31193131
public:
3132+
GetThingShadowResult() noexcept {}
31203133
GetThingShadowResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
31213134
GetThingShadowResponse *GetOperationResponse() const noexcept
31223135
{
@@ -3170,6 +3183,7 @@ namespace Aws
31703183
class SendConfigurationValidityReportResult
31713184
{
31723185
public:
3186+
SendConfigurationValidityReportResult() noexcept {}
31733187
SendConfigurationValidityReportResult(TaggedResult &&taggedResult) noexcept
31743188
: m_taggedResult(std::move(taggedResult))
31753189
{
@@ -3226,6 +3240,7 @@ namespace Aws
32263240
class UpdateThingShadowResult
32273241
{
32283242
public:
3243+
UpdateThingShadowResult() noexcept {}
32293244
UpdateThingShadowResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
32303245
UpdateThingShadowResponse *GetOperationResponse() const noexcept
32313246
{
@@ -3279,6 +3294,7 @@ namespace Aws
32793294
class UpdateConfigurationResult
32803295
{
32813296
public:
3297+
UpdateConfigurationResult() noexcept {}
32823298
UpdateConfigurationResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
32833299
UpdateConfigurationResponse *GetOperationResponse() const noexcept
32843300
{
@@ -3332,6 +3348,7 @@ namespace Aws
33323348
class ValidateAuthorizationTokenResult
33333349
{
33343350
public:
3351+
ValidateAuthorizationTokenResult() noexcept {}
33353352
ValidateAuthorizationTokenResult(TaggedResult &&taggedResult) noexcept
33363353
: m_taggedResult(std::move(taggedResult))
33373354
{
@@ -3388,6 +3405,7 @@ namespace Aws
33883405
class RestartComponentResult
33893406
{
33903407
public:
3408+
RestartComponentResult() noexcept {}
33913409
RestartComponentResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
33923410
RestartComponentResponse *GetOperationResponse() const noexcept
33933411
{
@@ -3441,6 +3459,7 @@ namespace Aws
34413459
class GetLocalDeploymentStatusResult
34423460
{
34433461
public:
3462+
GetLocalDeploymentStatusResult() noexcept {}
34443463
GetLocalDeploymentStatusResult(TaggedResult &&taggedResult) noexcept
34453464
: m_taggedResult(std::move(taggedResult))
34463465
{
@@ -3497,6 +3516,7 @@ namespace Aws
34973516
class GetSecretValueResult
34983517
{
34993518
public:
3519+
GetSecretValueResult() noexcept {}
35003520
GetSecretValueResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
35013521
GetSecretValueResponse *GetOperationResponse() const noexcept
35023522
{
@@ -3550,6 +3570,7 @@ namespace Aws
35503570
class UpdateStateResult
35513571
{
35523572
public:
3573+
UpdateStateResult() noexcept {}
35533574
UpdateStateResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
35543575
UpdateStateResponse *GetOperationResponse() const noexcept
35553576
{
@@ -3603,6 +3624,7 @@ namespace Aws
36033624
class ListNamedShadowsForThingResult
36043625
{
36053626
public:
3627+
ListNamedShadowsForThingResult() noexcept {}
36063628
ListNamedShadowsForThingResult(TaggedResult &&taggedResult) noexcept
36073629
: m_taggedResult(std::move(taggedResult))
36083630
{
@@ -3695,6 +3717,7 @@ namespace Aws
36953717
class SubscribeToComponentUpdatesResult
36963718
{
36973719
public:
3720+
SubscribeToComponentUpdatesResult() noexcept {}
36983721
SubscribeToComponentUpdatesResult(TaggedResult &&taggedResult) noexcept
36993722
: m_taggedResult(std::move(taggedResult))
37003723
{
@@ -3752,6 +3775,7 @@ namespace Aws
37523775
class ListLocalDeploymentsResult
37533776
{
37543777
public:
3778+
ListLocalDeploymentsResult() noexcept {}
37553779
ListLocalDeploymentsResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult))
37563780
{
37573781
}
@@ -3807,6 +3831,7 @@ namespace Aws
38073831
class StopComponentResult
38083832
{
38093833
public:
3834+
StopComponentResult() noexcept {}
38103835
StopComponentResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult)) {}
38113836
StopComponentResponse *GetOperationResponse() const noexcept
38123837
{
@@ -3860,6 +3885,7 @@ namespace Aws
38603885
class CreateLocalDeploymentResult
38613886
{
38623887
public:
3888+
CreateLocalDeploymentResult() noexcept {}
38633889
CreateLocalDeploymentResult(TaggedResult &&taggedResult) noexcept : m_taggedResult(std::move(taggedResult))
38643890
{
38653891
}

greengrass_ipc/source/DefaultConnectionConfig.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Aws
2323
m_connectAmendment = MessageAmendment(Crt::ByteBufFromCString(authTokenPayloadSS.str().c_str()));
2424
}
2525

26-
m_port = 0;
26+
m_port = static_cast<uint16_t>(0);
2727
Crt::Io::SocketOptions socketOptions;
2828
socketOptions.SetSocketDomain(Crt::Io::SocketDomain::Local);
2929
socketOptions.SetSocketType(Crt::Io::SocketType::Stream);

0 commit comments

Comments
 (0)