[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests: avoid c++ failure due to lack of getenv decl
From: |
Akim Demaille |
Subject: |
Re: [PATCH] tests: avoid c++ failure due to lack of getenv decl |
Date: |
Thu, 16 Feb 2012 15:55:22 +0100 |
Le 16 févr. 2012 à 12:50, Jim Meyering a écrit :
> Thanks. I'll adjust. (not so obvious after all, eh?)
Nope, sure :)
> Either way is fine.
> I was just making it consistent with the "main (void)"
> in the preceding test. Would you prefer to omit both?
Thanks for pointing this out. Actually, since I was already
wandering in the area and about to push changes, rather than
separating this commit from stylistic changes, I already pushed
the following.
From 0bb5783b3882aa0244d9c628b1fb9766e7e8a7d5 Mon Sep 17 00:00:00 2001
From: Akim Demaille <address@hidden>
Date: Thu, 16 Feb 2012 15:51:35 +0100
Subject: [PATCH 1/5] tests: c++: stylistic changes.
* tests/c++.at: Don't use void for incoming arguments.
Prefer cstdlib to stdlib.h.
---
tests/c++.at | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/c++.at b/tests/c++.at
index 3510498..2d5a026 100644
--- a/tests/c++.at
+++ b/tests/c++.at
@@ -179,7 +179,7 @@ yy::parser::error(const yy::parser::location_type&,
}
int
-main (void)
+main ()
{
yy::parser p;
p.set_debug_level(!!getenv("YYDEBUG"));
@@ -329,7 +329,7 @@ void
}
int
-main (void)
+main ()
{
]$1[::parser p;
return p.parse ();
@@ -432,7 +432,7 @@ yy::parser::error (const std::string &m)
}
int
-main (void)
+main ()
{
yy::parser parser;
return parser.parse ();
@@ -461,7 +461,7 @@ AT_DATA_GRAMMAR([[input.yy]],
%code
{
- #include <stdlib.h>
+ #include <cstdlib>
int yylex (yy::parser::semantic_type *);
}
@@ -511,7 +511,7 @@ yy::parser::error (const std::string &m)
}
int
-main (void)
+main ()
{
yy::parser parser;
parser.set_debug_level(!!getenv("YYDEBUG"));
--
1.7.9