static const TpCMParamSpec account_spec = { "account", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, TP_CONN_MGR_PARAM_FLAG_REQUIRED, NULL, 0, NULL, NULL }; static const TpCMParamSpec password_spec = { "password", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, TP_CONN_MGR_PARAM_FLAG_REQUIRED, NULL, 0, NULL, NULL }; static TpCMParamSpec * _build_paramspecs (HazeProtocolInfo *hpi) { GArray *paramspecs = g_array_new (TRUE, TRUE, sizeof (TpCMParamSpec)); TpCMParamSpec paramspec; GList *opts = hpi->prpl_info->protocol_options; g_array_append_val (paramspecs, account_spec); if (!(hpi->prpl_info->options & OPT_PROTO_NO_PASSWORD)) { paramspec = password_spec; if (hpi->prpl_info->options & OPT_PROTO_PASSWORD_OPTIONAL) paramspec.flags = 0; g_array_append_val (paramspecs, paramspec); } return (TpCMParamSpec *) g_array_free (paramspecs, FALSE); } ---- connection-manager.c: In function ‘_build_paramspecs’: connection-manager.c:103: error: assignment of read-only variable ‘paramspec’ cc1: warnings being treated as errors connection-manager.c:97: warning: unused variable ‘opts’ make: *** [connection-manager.o] Error 1 (4 of 7): error: assignment of read-only variable ‘paramspec’