xref: /aosp_15_r20/external/fsverity-utils/scripts/run-sparse.sh (revision b13c0e4024008a1f948ee8189745cb3371f4ac04)
1#!/bin/bash
2# SPDX-License-Identifier: MIT
3# Copyright 2020 Google LLC
4#
5# Use of this source code is governed by an MIT-style
6# license that can be found in the LICENSE file or at
7# https://opensource.org/licenses/MIT.
8
9set -e -u -o pipefail
10
11find programs lib -name '*.c' | while read -r file; do
12	sparse "$file" -gcc-base-dir "$(gcc --print-file-name=)"	\
13		-Iinclude -D_FILE_OFFSET_BITS=64 -Wbitwise -D_GNU_SOURCE
14done
15