diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-04-05 14:26:08 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-04-05 14:26:08 +0000 |
commit | c758a2265c90e6d4e15c1a1942f481db606e3d3e (patch) | |
tree | fea28871f4da950827980a2f9c83132afbb9a6ed /src/Makefile.am | |
parent | ff04f0df98375f9e464ef0f5e02651e89872ebc2 (diff) |
Fail "make check" if you declare a GError*, leave it uninitialized and don't add a comment indicating that that's OK because you'll immediately use g_error_new (g_set_error asserts when it sees uninitialized GError*s, so they should be avoided). Fix the resulting "make check" failures.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 7656eeed4..f876f2ebb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -110,6 +110,14 @@ check-local:: echo "^^^ The above files contain tabs"; \ exit 1; \ fi + @echo "Checking for GError mistakes..." + @if grep -n '^ *GError *\*[a-zA-Z_][a-zA-Z0-9_]* *;' \ + $(whitespace_sources); \ + then \ + echo "^^^ The above files contain uninitialized GError*s -"; \ + echo " they should be initialized to NULL"; \ + exit 1; \ + fi telepathy_gabble_LDADD = libgabble-convenience.la \ $(top_builddir)/lib/telepathy-glib/libtelepathy-glib.la |