Skip to content

Commit 08c74a9

Browse files
committed
[C++] Warnings cleanup.
1 parent 5e68fd0 commit 08c74a9

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

sbe-benchmarks/src/main/cpp/SbeCarCodecBench.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
using namespace uk::co::real_logic::sbe::benchmarks;
2323

2424
char VEHICLE_CODE[] = {'a', 'b', 'c', 'd', 'e', 'f'};
25-
uint32_t SOMENUMBERS[] = { 1, 2, 3, 4, 5 };
25+
uint32_t SOME_NUMBERS[] = { 1, 2, 3, 4, 5 };
2626
char MANUFACTURER_CODE[] = {'1', '2', '3'};
2727
const char *MANUFACTURER = "Honda";
28-
int MANUFACTURERLEN = strlen(MANUFACTURER);
28+
size_t MANUFACTURER_LEN = strlen(MANUFACTURER);
2929
const char *MODEL = "Civic VTi";
30-
int MODELLEN = strlen(MODEL);
30+
size_t MODEL_LEN = strlen(MODEL);
3131

3232
class SbeCarCodecBench : public CodecBench<SbeCarCodecBench>
3333
{
@@ -40,7 +40,7 @@ class SbeCarCodecBench : public CodecBench<SbeCarCodecBench>
4040
.available(BooleanType::T)
4141
.code(Model::A)
4242
.putVehicleCode(VEHICLE_CODE)
43-
.putSomeNumbers((char *)SOMENUMBERS);
43+
.putSomeNumbers((char *)SOME_NUMBERS);
4444

4545
car.extras().clear()
4646
.cruiseControl(true)
@@ -73,8 +73,8 @@ class SbeCarCodecBench : public CodecBench<SbeCarCodecBench>
7373
.next().mph(60).seconds(7.1f)
7474
.next().mph(100).seconds(11.8f);
7575

76-
car.putManufacturer(MANUFACTURER, MANUFACTURERLEN);
77-
car.putModel(MODEL, MODELLEN);
76+
car.putManufacturer(MANUFACTURER, MANUFACTURER_LEN);
77+
car.putModel(MODEL, MODEL_LEN);
7878

7979
return car.encodedLength();
8080
}

sbe-tool/src/main/cpp/otf/IrDecoder.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <sys/uio.h>
2929
#include <unistd.h>
3030
#include <sys/stat.h>
31+
#include <stdint.h>
3132
#endif /* WIN32 */
3233

3334
#include <memory>

0 commit comments

Comments
 (0)