Changeset 61c9ee2 in mainline


Ignore:
Timestamp:
2018-01-08T18:18:16Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1728134, 931ef19, fd68aaf
Parents:
3d95c9d
Message:

Ccheck can now print the correct file name itself. Use a proper temporary file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/ccheck.sh

    r3d95c9d r61c9ee2  
    3636find abi kernel boot uspace -type f -regex '^.*\.[ch]$' | (
    3737while read fname; do
    38         $ccheck $fname >/tmp/ccheck.out 2>&1
     38        outfile="$(mktemp)"
     39        $ccheck $fname >"$outfile" 2>&1
    3940        rc=$?
    4041        if [ .$rc == .0 ]; then
    41                 if [ -s /tmp/ccheck.out ] ; then
     42                if [ -s "$outfile" ] ; then
    4243                        srepcnt=$((srepcnt + 1))
    43                         echo '**' Reports for file $fname: '**'
    44                         cat /tmp/ccheck.out
     44                        cat "$outfile"
    4545                else
    4646                        snorepcnt=$((snorepcnt + 1))
     
    4949                fcnt=$((fcnt + 1))
    5050        fi
     51
     52        rm -f "$outfile"
    5153done
    5254
Note: See TracChangeset for help on using the changeset viewer.