Skip to content
Commit e7b7691f authored by Chen Gang's avatar Chen Gang Committed by Greg Kroah-Hartman
Browse files

staging: wlags49_h2: fix up "205179d0 staging: wlags49_h2: strncpy, need...


staging: wlags49_h2: fix up "205179d0 staging: wlags49_h2: strncpy, need checking the memory length" for avoiding warnings

Type of 'probe_rsp->rawData[1]' is 'hcf_8' which is 'u8', it will
compare with 'int', so use min_t() to cast to 'u8' to avoid related
warning.

If use min(), it has '(void) (&_min1 == &_min2);', so if no type cast,
the compiler will report 'pointer types lacks a cast':

  drivers/staging/wlags49_h2/wl_main.c:3174:122: warning: comparison of distinct pointer types lacks a cast [enabled by default]

Signed-off-by: default avatarChen Gang <gang.chen@asianux.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 167bf09e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment