Skip to content

Commit be6a945

Browse files
committed
fix warnings + fix pub/sub roundtrip test (avoid shortcut)
1 parent 3a1f84a commit be6a945

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

fio-stl.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20159,7 +20159,7 @@ SFUNC int fio_string_write_base32dec(fio_str_info_s *dest,
2015920159
a.map! {|n| n.to_s 10 }
2016020160
puts "const static uint8_t base32decode[256] = { #{a.join(", ") } }; "
2016120161
*/
20162-
const static uint8_t base32decode[256] = {
20162+
static const uint8_t base32decode[256] = {
2016320163
255, 255, 255, 255, 255, 255, 255, 255, 32, 32, 32, 255, 255, 32, 255,
2016420164
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
2016520165
255, 255, 32, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
@@ -51421,6 +51421,10 @@ FIO_SFUNC void FIO_NAME_TEST(stl, pubsub_encryption)(void) {
5142151421
FIO_MEM_STACK_WIPE(2);
5142251422

5142351423
fio___pubsub_message_s *dec = fio___pubsub_message_alloc(enc->data.udata);
51424+
FIO_MEMCPY(dec->data.udata,
51425+
enc->data.udata,
51426+
origin.channel.len + origin.message.len +
51427+
FIO___PUBSUB_MESSAGE_OVERHEAD);
5142451428
dec->data.udata = enc->data.udata;
5142551429
FIO_ASSERT(!fio___pubsub_message_decrypt(dec), "decryption failed");
5142651430
FIO_ASSERT(enc->data.filter == dec->data.filter,

fio-stl/102 string core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2072,7 +2072,7 @@ SFUNC int fio_string_write_base32dec(fio_str_info_s *dest,
20722072
a.map! {|n| n.to_s 10 }
20732073
puts "const static uint8_t base32decode[256] = { #{a.join(", ") } }; "
20742074
*/
2075-
const static uint8_t base32decode[256] = {
2075+
static const uint8_t base32decode[256] = {
20762076
255, 255, 255, 255, 255, 255, 255, 255, 32, 32, 32, 255, 255, 32, 255,
20772077
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
20782078
255, 255, 32, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,

fio-stl/902 pubsub.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ FIO_SFUNC void FIO_NAME_TEST(stl, pubsub_encryption)(void) {
4848
FIO_MEM_STACK_WIPE(2);
4949

5050
fio___pubsub_message_s *dec = fio___pubsub_message_alloc(enc->data.udata);
51+
FIO_MEMCPY(dec->data.udata,
52+
enc->data.udata,
53+
origin.channel.len + origin.message.len +
54+
FIO___PUBSUB_MESSAGE_OVERHEAD);
5155
dec->data.udata = enc->data.udata;
5256
FIO_ASSERT(!fio___pubsub_message_decrypt(dec), "decryption failed");
5357
FIO_ASSERT(enc->data.filter == dec->data.filter,

0 commit comments

Comments
 (0)