diff mbox series

scripts: Use explicit typing for curses check

Message ID EF5FB6D0-A8A4-4CEC-AC15-FCE0825D8499@siemens.com
State Accepted
Headers show
Series scripts: Use explicit typing for curses check | expand

Commit Message

Storm, Christian June 3, 2024, 6:21 p.m. UTC
Clang recently upgraded Wimplicit-int to an error as C99
dropped support for implicitly assuming int if absent.
This warning was hidden by 2>/dev/null.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 scripts/kconfig/lxdialog/check-lxdialog.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Babic June 4, 2024, 1:33 p.m. UTC | #1
On 03.06.24 20:21, 'Storm, Christian' via swupdate wrote:
> Clang recently upgraded Wimplicit-int to an error as C99
> dropped support for implicitly assuming int if absent.
> This warning was hidden by 2>/dev/null.
>
> Signed-off-by: Christian Storm <christian.storm@siemens.com>
> ---
>   scripts/kconfig/lxdialog/check-lxdialog.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
> index 5075ebf2..910ca1f7 100755
> --- a/scripts/kconfig/lxdialog/check-lxdialog.sh
> +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
> @@ -47,7 +47,7 @@ trap "rm -f $tmp" 0 1 2 3 15
>   check() {
>           $cc -x c - -o $tmp 2>/dev/null <<'EOF'
>   #include CURSES_LOC
> -main() {}
> +int main() { return 0; }
>   EOF
>   	if [ $? != 0 ]; then
>   	    echo " *** Unable to find the ncurses libraries or the"       1>&2

Applied to -master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
index 5075ebf2..910ca1f7 100755
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -47,7 +47,7 @@  trap "rm -f $tmp" 0 1 2 3 15
 check() {
         $cc -x c - -o $tmp 2>/dev/null <<'EOF'
 #include CURSES_LOC
-main() {}
+int main() { return 0; }
 EOF
 	if [ $? != 0 ]; then
 	    echo " *** Unable to find the ncurses libraries or the"       1>&2