[PATCH 1/2] bindings: cxx: examples: consistently use () for functions taking no args

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>

While () and (void) are synonymous in C++, we use () everywhere else so
stick to that pattern in examples.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
---
 bindings/cxx/examples/async_watch_line_value.cpp      | 2 +-
 bindings/cxx/examples/find_line_by_name.cpp           | 2 +-
 bindings/cxx/examples/get_chip_info.cpp               | 2 +-
 bindings/cxx/examples/get_line_info.cpp               | 2 +-
 bindings/cxx/examples/get_line_value.cpp              | 2 +-
 bindings/cxx/examples/get_multiple_line_values.cpp    | 2 +-
 bindings/cxx/examples/reconfigure_input_to_output.cpp | 2 +-
 bindings/cxx/examples/toggle_line_value.cpp           | 2 +-
 bindings/cxx/examples/toggle_multiple_line_values.cpp | 2 +-
 bindings/cxx/examples/watch_line_info.cpp             | 2 +-
 bindings/cxx/examples/watch_line_rising.cpp           | 2 +-
 bindings/cxx/examples/watch_line_value.cpp            | 2 +-
 bindings/cxx/examples/watch_multiple_line_values.cpp  | 2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/bindings/cxx/examples/async_watch_line_value.cpp b/bindings/cxx/examples/async_watch_line_value.cpp
index d8317a5..9ea9763 100644
--- a/bindings/cxx/examples/async_watch_line_value.cpp
+++ b/bindings/cxx/examples/async_watch_line_value.cpp
@@ -31,7 +31,7 @@ const char* edge_event_type_str(const ::gpiod::edge_event &event)
 
 } /* namespace */
 
-int main(void)
+int main()
 {
 	/*
 	 * Assume a button connecting the pin to ground, so pull it up and
diff --git a/bindings/cxx/examples/find_line_by_name.cpp b/bindings/cxx/examples/find_line_by_name.cpp
index 983251a..7b56e69 100644
--- a/bindings/cxx/examples/find_line_by_name.cpp
+++ b/bindings/cxx/examples/find_line_by_name.cpp
@@ -15,7 +15,7 @@ const ::std::string line_name = "GPIO19";
 
 } /* namespace */
 
-int main(void)
+int main()
 {
 	/*
 	 * Names are not guaranteed unique, so this finds the first line with
diff --git a/bindings/cxx/examples/get_chip_info.cpp b/bindings/cxx/examples/get_chip_info.cpp
index 073a6c3..2bf26f0 100644
--- a/bindings/cxx/examples/get_chip_info.cpp
+++ b/bindings/cxx/examples/get_chip_info.cpp
@@ -15,7 +15,7 @@ const ::std::filesystem::path chip_path("/dev/gpiochip0");
 
 } /* namespace */
 
-int main(void)
+int main()
 {
 	::gpiod::chip chip(chip_path);
 	auto info = chip.get_info();
diff --git a/bindings/cxx/examples/get_line_info.cpp b/bindings/cxx/examples/get_line_info.cpp
index f2f071e..7d517af 100644
--- a/bindings/cxx/examples/get_line_info.cpp
+++ b/bindings/cxx/examples/get_line_info.cpp
@@ -17,7 +17,7 @@ const ::gpiod::line::offset line_offset = 3;
 
 } /* namespace */
 
-int main(void)
+int main()
 {
 	auto chip = ::gpiod::chip(chip_path);
 	auto info = chip.get_line_info(line_offset);
diff --git a/bindings/cxx/examples/get_line_value.cpp b/bindings/cxx/examples/get_line_value.cpp
index a14d7e4..fe4f52e 100644
--- a/bindings/cxx/examples/get_line_value.cpp
+++ b/bindings/cxx/examples/get_line_value.cpp
@@ -16,7 +16,7 @@ const ::gpiod::line::offset line_offset = 5;
 
 } /* namespace */
 
-int main(void)
+int main()
 {
 	auto request = ::gpiod::chip(chip_path)
 			       .prepare_request()
diff --git a/bindings/cxx/examples/get_multiple_line_values.cpp b/bindings/cxx/examples/get_multiple_line_values.cpp
index d1f22e7..cbd5395 100644
--- a/bindings/cxx/examples/get_multiple_line_values.cpp
+++ b/bindings/cxx/examples/get_multiple_line_values.cpp
@@ -15,7 +15,7 @@ const ::gpiod::line::offsets line_offsets = { 5, 3, 7 };
 
 } /* namespace */
 
-int main(void)
+int main()
 {
 	auto request = ::gpiod::chip(chip_path)
 			       .prepare_request()
diff --git a/bindings/cxx/examples/reconfigure_input_to_output.cpp b/bindings/cxx/examples/reconfigure_input_to_output.cpp
index 896c812..d55eaf5 100644
--- a/bindings/cxx/examples/reconfigure_input_to_output.cpp
+++ b/bindings/cxx/examples/reconfigure_input_to_output.cpp
@@ -19,7 +19,7 @@ const ::gpiod::line::offset line_offset = 5;
 
 } /* namespace */
 
-int main(void)
+int main()
 {
 	/* request the line initially as an input */
 	auto request = ::gpiod::chip(chip_path)
diff --git a/bindings/cxx/examples/toggle_line_value.cpp b/bindings/cxx/examples/toggle_line_value.cpp
index a17b43b..3dbdb71 100644
--- a/bindings/cxx/examples/toggle_line_value.cpp
+++ b/bindings/cxx/examples/toggle_line_value.cpp
@@ -25,7 +25,7 @@ const ::gpiod::line::offset line_offset = 5;
 
 } /* namespace */
 
-int main(void)
+int main()
 {
 	::gpiod::line::value value = ::gpiod::line::value::ACTIVE;
 
diff --git a/bindings/cxx/examples/toggle_multiple_line_values.cpp b/bindings/cxx/examples/toggle_multiple_line_values.cpp
index a5b84bf..df55313 100644
--- a/bindings/cxx/examples/toggle_multiple_line_values.cpp
+++ b/bindings/cxx/examples/toggle_multiple_line_values.cpp
@@ -37,7 +37,7 @@ void print_values(::gpiod::line::offsets const &offsets,
 
 } /* namespace */
 
-int main(void)
+int main()
 {
 	::gpiod::line::values values = { ::gpiod::line::value::ACTIVE,
 					 ::gpiod::line::value::ACTIVE,
diff --git a/bindings/cxx/examples/watch_line_info.cpp b/bindings/cxx/examples/watch_line_info.cpp
index 414fb06..6d55500 100644
--- a/bindings/cxx/examples/watch_line_info.cpp
+++ b/bindings/cxx/examples/watch_line_info.cpp
@@ -30,7 +30,7 @@ const char *event_type(const ::gpiod::info_event &event)
 
 } /* namespace */
 
-int main(void)
+int main()
 {
 	::gpiod::chip chip(chip_path);
 
diff --git a/bindings/cxx/examples/watch_line_rising.cpp b/bindings/cxx/examples/watch_line_rising.cpp
index aa3be9c..33e4f01 100644
--- a/bindings/cxx/examples/watch_line_rising.cpp
+++ b/bindings/cxx/examples/watch_line_rising.cpp
@@ -29,7 +29,7 @@ const char *edge_event_type_str(const ::gpiod::edge_event &event)
 
 } /* namespace */
 
-int main(void)
+int main()
 {
 	auto request =
 		::gpiod::chip(chip_path)
diff --git a/bindings/cxx/examples/watch_line_value.cpp b/bindings/cxx/examples/watch_line_value.cpp
index 5055789..ebc7fe7 100644
--- a/bindings/cxx/examples/watch_line_value.cpp
+++ b/bindings/cxx/examples/watch_line_value.cpp
@@ -29,7 +29,7 @@ const char *edge_event_type_str(const ::gpiod::edge_event &event)
 
 } /* namespace */
 
-int main(void)
+int main()
 {
 	/*
 	 * Assume a button connecting the pin to ground, so pull it up and
diff --git a/bindings/cxx/examples/watch_multiple_line_values.cpp b/bindings/cxx/examples/watch_multiple_line_values.cpp
index 42b7213..fb71fb2 100644
--- a/bindings/cxx/examples/watch_multiple_line_values.cpp
+++ b/bindings/cxx/examples/watch_multiple_line_values.cpp
@@ -28,7 +28,7 @@ const char *edge_event_type_str(const ::gpiod::edge_event &event)
 
 } /* namespace */
 
-int main(void)
+int main()
 {
 	auto request =
 		::gpiod::chip(chip_path)
-- 
2.39.2




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux