DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: fix warnings on Windows
@ 2020-05-13 22:53 Pallavi Kadam
  2020-05-14  0:43 ` Dmitry Kozlyuk
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Pallavi Kadam @ 2020-05-13 22:53 UTC (permalink / raw)
  To: dev, thomas; +Cc: ranjit.menon, pallavi.kadam

This patch fixes bunch of warnings when compiling on Windows
such as the use of an unsafe string function (strerror),
[-Wunused-const-variable] in getopt.c and
[-Wunused-variable], [-Wunused-function] in eal_common_options.c

Signed-off-by: Ranjit Menon <ranjit.menon@intel.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
---
 lib/librte_eal/common/eal_common_options.c | 6 +++++-
 lib/librte_eal/windows/getopt.c            | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 8f2cbd1c6..2efbf59e4 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -115,8 +115,10 @@ struct shared_driver {
 static struct shared_driver_list solib_list =
 TAILQ_HEAD_INITIALIZER(solib_list);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* Default path of external loadable drivers */
 static const char *default_solib_dir = RTE_EAL_PMD_PATH;
+#endif
 
 /*
  * Stringified version of solib path used by dpdk-pmdinfo.py
@@ -329,6 +331,7 @@ eal_plugin_add(const char *path)
 	return 0;
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 static int
 eal_plugindir_init(const char *path)
 {
@@ -362,6 +365,7 @@ eal_plugindir_init(const char *path)
 	/* XXX this ignores failures from readdir() itself */
 	return (dent == NULL) ? 0 : -1;
 }
+#endif
 
 int
 eal_plugins_init(void)
@@ -394,8 +398,8 @@ eal_plugins_init(void)
 		}
 
 	}
-	return 0;
 #endif
+	return 0;
 }
 
 /*
diff --git a/lib/librte_eal/windows/getopt.c b/lib/librte_eal/windows/getopt.c
index 170c9b5e0..a08f7c109 100644
--- a/lib/librte_eal/windows/getopt.c
+++ b/lib/librte_eal/windows/getopt.c
@@ -25,8 +25,8 @@ int	opterr = 1;		/* if error message should be printed */
 int	optind = 1;		/* index into parent argv vector */
 int	optopt = '?';		/* character checked for validity */
 
-static void pass(void) {}
-#define warnx(a, ...) pass()
+static void pass(const char *a) {(void) a; }
+#define warnx(a, ...) pass(a)
 
 #define PRINT_ERROR	((opterr) && (*options != ':'))
 
-- 
2.18.0.windows.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-06-15  9:37 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 22:53 [dpdk-dev] [PATCH] eal: fix warnings on Windows Pallavi Kadam
2020-05-14  0:43 ` Dmitry Kozlyuk
2020-05-14  1:24   ` Ranjit Menon
2020-05-14  8:02 ` Thomas Monjalon
2020-05-14 17:46   ` Ranjit Menon
2020-05-14 20:39 ` [dpdk-dev] [PATCH v2] " Pallavi Kadam
2020-05-15 19:20   ` Dmitry Kozlyuk
2020-05-18 22:08   ` Narcisa Ana Maria Vasile
2020-05-28 23:14   ` [dpdk-dev] [PATCH v3 0/2] Fix Windows compiler warnings Pallavi Kadam
2020-05-28 23:14     ` [dpdk-dev] [PATCH v3 1/2] eal: fix warnings on Windows Pallavi Kadam
2020-06-11 16:14       ` Thomas Monjalon
2020-06-11 18:55         ` Kadam, Pallavi
2020-05-28 23:14     ` [dpdk-dev] [PATCH v3 2/2] build: treat warning as an error " Pallavi Kadam
2020-06-11 16:12       ` Thomas Monjalon
2020-06-11 18:54         ` Kadam, Pallavi
2020-06-11 19:50     ` [dpdk-dev] [PATCH v4] eal: fix warnings " Pallavi Kadam
2020-06-11 20:18       ` Narcisa Ana Maria Vasile
2020-06-15  9:37         ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).