logger: Suppress SVACE sign extension warnings 89/258489/1
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Tue, 18 May 2021 12:26:51 +0000 (14:26 +0200)
committerSylwester Nawrocki <s.nawrocki@samsung.com>
Tue, 18 May 2021 12:38:34 +0000 (14:38 +0200)
commit56a67724efeaee05e76ca6cb75c3ab48f142735f
tree9d150178b5334c7a79f7e280862170d8dae67136
parentab562dc04ced52021ec709643282bfadafeedd21
logger: Suppress SVACE sign extension warnings

This patch suppresses SVACE warnings shown below and makes the code more
robust. The actual sign extension issue cannot happen in current code as
value of the len variable in function logger_set_tag() is limited to
LOGGER_ENTRY_MAX_PAYLOAD and create_log() is being called only with fixed
size argument values.

* SIGNED_TO_BIGGER_UNSIGNED: Assignment of a signed value which has type 'int' to a variable of a bigger integer type 'size_t'
    Sign extension at linux-rpi3/drivers/staging/android/logger.c:898

* SIGNED_TO_BIGGER_UNSIGNED: Assignment of a signed value which has type 'int' to a variable of a bigger integer type 'size_t'
    Sign extension at linux-rpi3/drivers/staging/android/logger.c:1045

Change-Id: I8646555e1a09fb0feb4c12961965aea36c80cd38
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
drivers/staging/android/logger.c