Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/ci/check-unsafe-assertions.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / ci / check-unsafe-assertions.sh` 18 lines ยท 567 bytes Raw Blame History 1 #!/bin/sh 2 3 make CHECK_ASSERTION_SIDE_EFFECTS=1 >compiler_output 2>compiler_error 4 if test $? != 0 5 then 6 echo >&2 "ERROR: The compiler could not verify the following assert()" 7 echo >&2 " calls are free of side-effects. Please replace with" 8 echo >&2 " ASSERT() calls." 9 grep undefined.reference.to..not_supposed_to_survive compiler_error | 10 sed -e s/:[^:]*$// | sort | uniq | tr ':' ' ' | 11 while read f l 12 do 13 printf "${f}:${l}\n " 14 awk -v start="$l" 'NR >= start { print; if (/\);/) exit }' $f 15 done 16 exit 1 17 fi 18 rm compiler_output compiler_error