xbps_init: use __UNCONST to shut up gcc's -Wcast-qual warnings.

This commit is contained in:
Juan RP 2011-12-15 11:30:17 +01:00
parent b0ceeaa58e
commit 93e3603dcc

View File

@ -62,24 +62,25 @@ int
xbps_init(struct xbps_handle *xh) xbps_init(struct xbps_handle *xh)
{ {
cfg_opt_t vpkg_opts[] = { cfg_opt_t vpkg_opts[] = {
CFG_STR_LIST((char *)"targets", NULL, CFGF_NONE), CFG_STR_LIST(__UNCONST("targets"), NULL, CFGF_NONE),
CFG_END() CFG_END()
}; };
cfg_opt_t opts[] = { cfg_opt_t opts[] = {
/* Defaults if not set in configuration file */ /* Defaults if not set in configuration file */
CFG_STR((char *)"rootdir", (char *)"/", CFGF_NONE), CFG_STR(__UNCONST("rootdir"), __UNCONST("/"), CFGF_NONE),
CFG_STR((char *)"cachedir", (char *)XBPS_CACHE_PATH, CFGF_NONE), CFG_STR(__UNCONST("cachedir"),
CFG_INT((char *)"fetch-cache-connections", __UNCONST(XBPS_CACHE_PATH), CFGF_NONE),
CFG_INT(__UNCONST("fetch-cache-connections"),
XBPS_FETCH_CACHECONN, CFGF_NONE), XBPS_FETCH_CACHECONN, CFGF_NONE),
CFG_INT((char *)"fetch-cache-connections-per-host", CFG_INT(__UNCONST("fetch-cache-connections-per-host"),
XBPS_FETCH_CACHECONN_HOST, CFGF_NONE), XBPS_FETCH_CACHECONN_HOST, CFGF_NONE),
CFG_INT((char *)"fetch-timeout-connection", CFG_INT(__UNCONST("fetch-timeout-connection"),
XBPS_FETCH_TIMEOUT, CFGF_NONE), XBPS_FETCH_TIMEOUT, CFGF_NONE),
CFG_BOOL((char *)"syslog", true, CFGF_NONE), CFG_BOOL(__UNCONST("syslog"), true, CFGF_NONE),
CFG_STR_LIST((char *)"repositories", NULL, CFGF_MULTI), CFG_STR_LIST(__UNCONST("repositories"), NULL, CFGF_MULTI),
CFG_SEC((char *)"virtual-package", CFG_SEC(__UNCONST("virtual-package"),
vpkg_opts, CFGF_MULTI|CFGF_TITLE), vpkg_opts, CFGF_MULTI|CFGF_TITLE),
CFG_FUNC((char *)"include", &cfg_include), CFG_FUNC(__UNCONST("include"), &cfg_include),
CFG_END() CFG_END()
}; };
int rv, cc, cch; int rv, cc, cch;