Skip to content
Commit d8f6e5c6 authored by Sumera Priyadarsini's avatar Sumera Priyadarsini Committed by Julia Lawall
Browse files

scripts: coccicheck: Correct usage of make coccicheck



The command "make coccicheck C=1 CHECK=scripts/coccicheck" results in the
error:
        ./scripts/coccicheck: line 65: -1: shift count out of range

This happens because every time the C variable is specified,
the shell arguments need to be "shifted" in order to take only
the last argument, which is the C file to test. These shell arguments
mostly comprise flags that have been set in the Makefile. However,
when coccicheck is specified in the make command as a rule, the
number of shell arguments is zero, thus passing the invalid value -1
to the shift command, resulting in an error.

Modify coccicheck to print correct usage of make coccicheck so as to
avoid the error.

Signed-off-by: default avatarSumera Priyadarsini <sylphrenadin@gmail.com>
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
parent d2ee8447
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment