]> git.dujemihanovic.xyz Git - u-boot.git/commit
cmd: ini: Fix build warning
authorJonas Karlman <jonas@kwiboo.se>
Sat, 22 Jul 2023 14:02:13 +0000 (14:02 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 28 Jul 2023 10:45:03 +0000 (18:45 +0800)
commit8c1bb04b5699ce74ad727d4513e1a40a58c9c628
tree0623246cddb67b95ddb8bac04152a4a4020dfc58
parent7af6616c961d213b4bf2cc88003cbd868ea11ffa
cmd: ini: Fix build warning

Building U-Boot with CMD_INI=y result in following build warning:

  cmd/ini.c: In function 'memgets':
  include/linux/kernel.h:184:24: warning: comparison of distinct pointer types lacks a cast
    184 |         (void) (&_min1 == &_min2);              \
        |                        ^~
  cmd/ini.c:92:15: note: in expansion of macro 'min'
     92 |         len = min((end - *mem) + newline, num);
        |               ^~~

Fix this by adding an int cast to the pointer arithmetic result.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
cmd/ini.c