Because the ini parser uses const strings and so the opt parsing
needs to be told about it to avoid compiler warnings.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
uuid_unparse(*uu, buffer);
}
-static __inline__ int platform_uuid_parse(char *buffer, uuid_t *uu)
+static __inline__ int platform_uuid_parse(const char *buffer, uuid_t *uu)
{
return uuid_parse(buffer, *uu);
}
static void
unknown(
- char opt,
- char *s)
+ const char opt,
+ const char *s)
{
fprintf(stderr, _("unknown option -%c %s\n"), opt, s);
usage();
*/
static char *
getstr(
- char *str,
+ const char *str,
struct opt_params *opts,
int index)
{
/* empty strings for string options are not valid */
if (!str || *str == '\0')
reqval(opts->name, opts->subopts, index);
- return str;
+ return (char *)str;
}
static int
block_opts_parser(
struct opt_params *opts,
int subopt,
- char *value,
+ const char *value,
struct cli_params *cli)
{
switch (subopt) {
cfgfile_opts_parser(
struct opt_params *opts,
int subopt,
- char *value,
+ const char *value,
struct cli_params *cli)
{
switch (subopt) {
data_opts_parser(
struct opt_params *opts,
int subopt,
- char *value,
+ const char *value,
struct cli_params *cli)
{
switch (subopt) {
inode_opts_parser(
struct opt_params *opts,
int subopt,
- char *value,
+ const char *value,
struct cli_params *cli)
{
switch (subopt) {
log_opts_parser(
struct opt_params *opts,
int subopt,
- char *value,
+ const char *value,
struct cli_params *cli)
{
switch (subopt) {
meta_opts_parser(
struct opt_params *opts,
int subopt,
- char *value,
+ const char *value,
struct cli_params *cli)
{
switch (subopt) {
naming_opts_parser(
struct opt_params *opts,
int subopt,
- char *value,
+ const char *value,
struct cli_params *cli)
{
switch (subopt) {
rtdev_opts_parser(
struct opt_params *opts,
int subopt,
- char *value,
+ const char *value,
struct cli_params *cli)
{
switch (subopt) {
sector_opts_parser(
struct opt_params *opts,
int subopt,
- char *value,
+ const char *value,
struct cli_params *cli)
{
switch (subopt) {
struct opt_params *opts;
int (*parser)(struct opt_params *opts,
int subopt,
- char *value,
+ const char *value,
struct cli_params *cli);
} subopt_tab[] = {
{ 'b', &bopts, block_opts_parser },