From 149b142a71a33f476eeb67b8c8519e57d0fbd307 Mon Sep 17 00:00:00 2001 From: Robert David Graham <robert_david_graham@yahoo.com> Date: Tue, 12 Jun 2018 01:15:09 -0400 Subject: [PATCH] warnings --- src/proto-smb.c | 29 +++-------------------------- src/ranges.c | 3 ++- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/src/proto-smb.c b/src/proto-smb.c index db45c47..2b6f7f4 100644 --- a/src/proto-smb.c +++ b/src/proto-smb.c @@ -85,7 +85,7 @@ struct SmbParams params[] = { {0x73, 6, 2, IT_uint16, offsetof(struct Smb73_Setup, BlobLength)}, - {0xFF, 0, 65536, IT_uint0, 0}, + {0xFF, 0, 0xFF, IT_uint0, 0}, }; @@ -1759,7 +1759,8 @@ smb_parse_record( /***************************************************************************** *****************************************************************************/ -static int negot_add_dialect(unsigned char *buf, size_t sizeof_buf, const char *dialect) +int +negot_add_dialect(unsigned char *buf, size_t sizeof_buf, const char *dialect) { size_t nbt_length; size_t dialect_length = strlen(dialect) + 1; @@ -1825,30 +1826,6 @@ smb0_hello_template[] = { 0x4d, 0x42, 0x20, 0x32, 0x2e, 0x3f, 0x3f, 0x3f, 0x00*/ }; -static const char -smb1x_hello_template[] = { - 0x00, 0x00, 0x00, 0x2f, 0xff, 0x53, 0x4d, 0x42, - 0x72, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0xc0, /* */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x02, - 0x4e, 0x54, 0x20, 0x4c, 0x4d, 0x20, 0x30, 0x2e, - 0x31, 0x32, 0x00 -}; - -static const char -xsmb1_hello_template[] = { - 0x00, 0x00, 0x00, 0x45, 0xff, 0x53, 0x4d, 0x42, - 0x72, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0xc8, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x00, 0x22, 0x00, 0x02, - 0x4e, 0x54, 0x20, 0x4c, 0x4d, 0x20, 0x30, 0x2e, - 0x31, 0x32, 0x00, 0x02, 0x53, 0x4d, 0x42, 0x20, - 0x32, 0x2e, 0x30, 0x30, 0x32, 0x00, 0x02, 0x53, - 0x4d, 0x42, 0x20, 0x32, 0x2e, 0x3f, 0x3f, 0x3f, - 0x00 -}; static const unsigned char diff --git a/src/ranges.c b/src/ranges.c index 423391b..c2b7441 100644 --- a/src/ranges.c +++ b/src/ranges.c @@ -102,7 +102,6 @@ debug_dump_ranges(struct RangeList *task) void rangelist_add_range(struct RangeList *task, unsigned begin, unsigned end) { - unsigned i; struct Range range; range.begin = begin; @@ -127,6 +126,8 @@ rangelist_add_range(struct RangeList *task, unsigned begin, unsigned end) } #if 0 + unsigned i; + /* See if the range overlaps any exist range already in the * list */ for (i = 0; i < task->count; i++) { -- GitLab