You are welcome!

BR,

Alan

On 8/21/22, Erhan Kurubas <erhan.kuru...@espressif.com> wrote:
> Hi Alan,
>
> Yes :)  Thanks to notice this in a minute.
>
>> On 21 Aug 2022, at 22:09, Alan Carvalho de Assis <acas...@gmail.com>
>> wrote:
>>
>> [External: This email originated outside Espressif]
>>
>> Hi Erhan,
>>
>> I think you cannot do "bank_idx & 999" because 999 is 1111100111 in
>> binary
>>
>> So a bank_idx 8 (1000 in binary) will become 0.
>>
>> BR,
>>
>> Alan
>>
>> On 8/21/22, ger...@openocd.org <ger...@openocd.org> wrote:
>>> This is an automated email from Gerrit.
>>>
>>> "Erhan Kurubas <erhan.kuru...@espressif.com>" just uploaded a new patch
>>> set
>>> to Gerrit, which you can find at
>>> https://review.openocd.org/c/openocd/+/7140
>>>
>>> -- gerrit
>>>
>>> commit 417a1b46e5846236fa94d9d75150fb2ce7706bf8
>>> Author: Erhan Kurubas <erhan.kuru...@espressif.com>
>>> Date:   Sun Aug 21 21:57:32 2022 +0300
>>>
>>>    flash/nor/kinetis: fix clang scan-build error format-truncation
>>>
>>>    kinetis.c:994:61: error: '%u' directive output may be truncated
>>>    writing between 1 and 10 bytes into a region of size 4
>>>    [-Werror=format-truncation=]
>>>
>>>    tested with scan-build-14
>>>
>>>    Signed-off-by: Erhan Kurubas <erhan.kuru...@espressif.com>
>>>    Change-Id: I72d141a3f8e19ca3596beee2be8434fc8492946f
>>>
>>> diff --git a/src/flash/nor/kinetis.c b/src/flash/nor/kinetis.c
>>> index 12e3f5fb9d..57c098c748 100644
>>> --- a/src/flash/nor/kinetis.c
>>> +++ b/src/flash/nor/kinetis.c
>>> @@ -991,7 +991,7 @@ static int kinetis_create_missing_banks(struct
>>> kinetis_chip *k_chip)
>>>              if (bank_idx < k_chip->num_pflash_blocks) {
>>>                      class = "pflash";
>>>                      if (k_chip->num_pflash_blocks > 1)
>>> -                             snprintf(num, sizeof(num), "%u",
>>> bank_idx);
>>> +                             snprintf(num, sizeof(num), "%u", bank_idx &
>>> 999);
>>>              } else {
>>>                      class = "flexnvm";
>>>                      if (k_chip->num_nvm_blocks > 1)
>>>
>>> --
>>>
>>>
>
>

Reply via email to