sahlberg / libsmb2

SMB2/3 userspace client
Other
322 stars 137 forks source link

fix p_syntax_id_t initialize #313

Closed nopnop2002 closed 8 months ago

nopnop2002 commented 8 months ago

The following structures are defined.

typedef struct p_syntax_id {
        dcerpc_uuid_t uuid;
        uint16_t vers;
        uint16_t vers_minor;
} p_syntax_id_t;

p_syntax_id_t has three member variables.

The structure is initialized below, but one member variable is missing.

p_syntax_id_t ndr32_syntax = {
        {NDR32_UUID}, 2
};

p_syntax_id_t ndr64_syntax = {
        {NDR64_UUID}, 1
};

Such a change is required.

p_syntax_id_t ndr32_syntax = {
        {NDR32_UUID}, 2, 0
};

p_syntax_id_t ndr64_syntax = {
        {NDR64_UUID}, 1, 0
};
sahlberg commented 8 months ago

Merged, thanks! Which compiler did you see this complaining about this? The remaining elements should default to be set to all 0.

nopnop2002 commented 8 months ago

Which compiler did you see this complaining about this?

$ xtensa-esp32-elf-cc --version xtensa-esp32-elf-cc (crosstool-NG esp-2021r2-patch5) 8.4.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Wolf3s commented 8 months ago

Which compiler did you see this complaining about this?

$ xtensa-esp32-elf-cc --version xtensa-esp32-elf-cc (crosstool-NG esp-2021r2-patch5) 8.4.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

if you find more warnings push more requests.