Skip to contentSkip to conversation

Remove excess semicolon (invalid C99).

PATCH In review Matthias Andree 1 participant 2 messages Dec 4, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove excess semicolon (invalid C99).

---
 misc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
misc.h +1 -1
index 3f22ca0..f449601 100644
@@ -143,7 +143,7 @@ openvpn_run_script (const struct argv *a, const struct env_set *es, const unsign
 
   openvpn_snprintf(msg, sizeof(msg), "WARNING: Failed running command (%s)", hook);
   return openvpn_execve_check(a, es, flags | S_SCRIPT, msg);
-};
+}
 
 #ifdef HAVE_STRERROR
 /* a thread-safe version of strerror */
Signature · 1 line
1.7.3.2.5.gf772c
#1 lore raw

Am 04.12.2010 14:02, schrieb Matthias Andree:

Quoted 4 lines
---
 misc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

This applies to the beta2.2 branch and affects this code section:

138
139 static inline bool
140 openvpn_run_script (const struct argv *a, const struct env_set *es,
const unsigned int flags, const char *hook)
141 {
142 char msg[256];
143
144 openvpn_snprintf(msg, sizeof(msg), "WARNING: Failed running command
(%s)", hook);
145 return openvpn_execve_check(a, es, flags | S_SCRIPT, msg);
146 };
147

Evidently this is a function definition and hence not to be followed by a semicolon. Most compilers will accept it, but try gcc -Wall -Wextra -pedantic -std=c99 and see what you get :)

Signature · 1 line
Matthias Andree