[PATCH] Tweaked c syntax checker errorformat

Added a more specific c syntax checker errorformat before the more
general ones so the jumping is not broken by assuming the line number is
a part of the file.

Signed-off-by: kongo2002 <kongo2002@googlemail.com>
This commit is contained in:
Brandon Waskiewicz 2011-04-08 20:57:37 +02:00 committed by kongo2002
parent 65531d0ca3
commit d9ba6d7963

View File

@ -84,9 +84,9 @@ endfunction
function! SyntaxCheckers_c_GetLocList() function! SyntaxCheckers_c_GetLocList()
let makeprg = 'gcc -fsyntax-only '.shellescape(expand('%')).' -I. -I..' let makeprg = 'gcc -fsyntax-only '.shellescape(expand('%')).' -I. -I..'
let errorformat = '%-G%f:%s:,%-G%f:%l: %#error: %#(Each undeclared '. let errorformat = '%-G%f:%s:,%-G%f:%l: %#error: %#(Each undeclared '.
\ 'identifier is reported only%.%#,%-G%f:%l: %#error: %#for '. \ 'identifier is reported only%.%#,%-G%f:%l: %#error: %#for '.
\ 'each function it appears%.%#,%-GIn file included%.%#,'. \ 'each function it appears%.%#,%-GIn file included%.%#,'.
\ '%-G %#from %f:%l\,,%f:%l: %trror: %m,%f:%l: %m' \ '%-G %#from %f:%l\,,%f:%l:%c: %m,%f:%l: %trror: %m,%f:%l: %m'
if expand('%') =~? '.h$' if expand('%') =~? '.h$'
if exists('g:syntastic_c_check_header') if exists('g:syntastic_c_check_header')