view runtime/tools/mve.awk @ 15253:8d7a3fd70ff4 v8.1.0635

patch 8.1.0635: Coverity complains about null pointer use commit https://github.com/vim/vim/commit/e38197d50f7068c4b68043792d283da98e526ec3 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Dec 24 23:35:13 2018 +0100 patch 8.1.0635: Coverity complains about null pointer use Problem: Coverity complains about null pointer use. Solution: Avoid using a null pointer.
author Bram Moolenaar <Bram@vim.org>
date Mon, 24 Dec 2018 23:45:04 +0100
parents 3fc0f57ecb91
children
line wrap: on
line source

#!/usr/bin/nawk -f
#
# Change "nawk" to "awk" or "gawk" if you get errors.
#
# Make Vim Errors
# Processes errors from cc for use by Vim's quick fix tools
# specifically it translates the ---------^ notation to a
# column number
#
BEGIN { FS="[:,]" }

/^cfe/ { file=$3
	 msg=$5
	 split($4,s," ")
	 line=s[2]
}

# You may have to substitute a tab character for the \t here:
/^[\t-]*\^/ {
	p=match($0, ".*\\^" )
	col=RLENGTH-2
	printf("%s, line %d, col %d : %s\n", file,line,col,msg)
}