Bug 54119 - use AS_IF, AS_CASE instead of if/fi and case/esac
Summary: use AS_IF, AS_CASE instead of if/fi and case/esac
Alias: None
Product: Telepathy
Classification: Unclassified
Component: salut (show other bugs)
Version: unspecified
Hardware: Other All
: low minor
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL: http://cgit.freedesktop.org/~smcv/tel...
Whiteboard: review+
Keywords: patch
Depends on:
Reported: 2012-08-27 09:45 UTC by Simon McVittie
Modified: 2013-05-03 10:56 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Description Simon McVittie 2012-08-27 09:45:08 UTC
+++ This bug was initially created as a clone of Bug #53445 +++

Ordinary shell conditionals with "if" or "case" aren't actually safe in configure.ac; it's sometimes necessary to use AS_IF, AS_CASE. Ideally, we should do that consistently across all projects.
Comment 1 Simon McVittie 2013-01-04 12:39:49 UTC
Here is a branch with this change and a bunch of other trivia.
Comment 2 Simon McVittie 2013-01-04 13:06:48 UTC
(Branch updated, now at e1a4558.)
Comment 3 Simon McVittie 2013-01-04 16:27:48 UTC
(And again, 58aefe4)
Comment 4 Will Thompson 2013-05-01 18:33:47 UTC
-if grep -n '^ *GError *\*[[:alpha:]_][[:alnum:]_]* *;' "$@"
-  echo "^^^ The above files contain uninitialized GError*s - they should be"
-  echo "    initialized to NULL"
-  fail=1

Ugh, I found http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=05b3d1e1f9d5c63d0d01a9cecc3f04cae3191605 and I don't really agree that this is legit unless you have the GError in a struct I guess? Oh well.
Comment 5 Will Thompson 2013-05-01 18:38:19 UTC
This branch looks fine. I skim-read a lot of it, to be honest, but I read the bits that might cause havoc (eg. sealed struct updates) and they seem fine.
Comment 6 Simon McVittie 2013-05-03 10:56:25 UTC
Fixed in git for 0.9.0.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.