eal: fix pedantic build of mlx4 debug mode
[dpdk.git] / lib / librte_eal / common / eal_common_options.c
index c59370b..1f459ac 100644 (file)
@@ -70,7 +70,7 @@ eal_short_options[] =
 const struct option
 eal_long_options[] = {
        {OPT_BASE_VIRTADDR,     1, NULL, OPT_BASE_VIRTADDR_NUM    },
-       {OPT_CREATE_UIO_DEV,    1, NULL, OPT_CREATE_UIO_DEV_NUM   },
+       {OPT_CREATE_UIO_DEV,    0, NULL, OPT_CREATE_UIO_DEV_NUM   },
        {OPT_FILE_PREFIX,       1, NULL, OPT_FILE_PREFIX_NUM      },
        {OPT_HELP,              0, NULL, OPT_HELP_NUM             },
        {OPT_HUGE_DIR,          1, NULL, OPT_HUGE_DIR_NUM         },
@@ -131,6 +131,7 @@ eal_reset_internal_config(struct internal_config *internal_cfg)
        internal_cfg->no_hpet = 1;
 #endif
        internal_cfg->vmware_tsc_map = 0;
+       internal_cfg->create_uio_dev = 0;
 }
 
 /*
@@ -170,7 +171,7 @@ eal_parse_coremask(const char *coremask)
        if (coremask[0] == '0' && ((coremask[1] == 'x')
                || (coremask[1] == 'X')))
                coremask += 2;
-       i = strnlen(coremask, PATH_MAX);
+       i = strlen(coremask);
        while ((i > 0) && isblank(coremask[i - 1]))
                i--;
        if (i == 0)
@@ -230,7 +231,7 @@ eal_parse_corelist(const char *corelist)
        /* Remove all blank characters ahead and after */
        while (isblank(*corelist))
                corelist++;
-       i = strnlen(corelist, sysconf(_SC_ARG_MAX));
+       i = strlen(corelist);
        while ((i > 0) && isblank(corelist[i - 1]))
                i--;
 
@@ -475,7 +476,7 @@ eal_parse_lcores(const char *lcores)
        /* Remove all blank characters ahead and after */
        while (isblank(*lcores))
                lcores++;
-       i = strnlen(lcores, sysconf(_SC_ARG_MAX));
+       i = strlen(lcores);
        while ((i > 0) && isblank(lcores[i - 1]))
                i--;
 
@@ -849,9 +850,8 @@ eal_check_common_options(struct internal_config *internal_cfg)
                        "be specified at the same time\n");
                return -1;
        }
-       if (internal_cfg->no_hugetlbfs &&
-                       (mem_parsed || internal_cfg->force_sockets == 1)) {
-               RTE_LOG(ERR, EAL, "Options -m or --"OPT_SOCKET_MEM" cannot "
+       if (internal_cfg->no_hugetlbfs && internal_cfg->force_sockets == 1) {
+               RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_MEM" cannot "
                        "be specified together with --"OPT_NO_HUGE"\n");
                return -1;
        }