HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-26-0-120 6.17.0-1009-aws #9~24.04.2-Ubuntu SMP Fri Mar 6 23:50:29 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: //usr/lib/modules/7.0.0-1009-aws/build/scripts/checker-valid.sh
#!/bin/sh -eu
# SPDX-License-Identifier: GPL-2.0

[ ! -x "$(command -v "$1")" ] && exit 1

tmp_file=$(mktemp)
trap "rm -f $tmp_file" EXIT

cat << EOF >$tmp_file
static inline int u(const int *q)
{
	__typeof_unqual__(*q) v = *q;
	return v;
}
EOF

# sparse happily exits with 0 on error so validate
# there is none on stderr. Use awk as grep is a pain with sh -e
$@ $tmp_file 2>&1 | awk -v c=1 '/error/{c=0}END{print c}'