usersession/agent: only close session bus if non-nil
On Ubuntu 16.04, ssh sessions may not have a D-Bus session bus, resulting in the `bus` field of the session agent being nil. If this is the case, calling `s.bus.Close()` results in a nil pointer exception. This commit adds a check of `s.bus` (like those found elsewhere in session_agent.go) before calling `s.bus.Close()` during a session shutdown.
Discovered-by: Andrew Phelps <email address hidden> Signed-off-by: Oliver Calder <email address hidden>
cmd/Makefile.am: add warning to all CFLAGS (#13133)
Some target were not having warnings, for instance snap-generator, because they did not have explicit CFLAGS, and AM_CFLAGS did not contain CHECK_CFLAGS.