[Top][All Lists]

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

[PATCH 5/5] evalstring: drop volatile on sigset

From: Mike Frysinger
Subject: [PATCH 5/5] evalstring: drop volatile on sigset
Date: Thu, 11 Aug 2016 20:30:50 +0800

These variables are located on the stack and are never read/written
directly by bash.  Instead, they're all accessed indirectly via the
POSIX signal API.  Since POSIX does not require volatile, and bash
itself doesn't require volatile, drop the volatile markings.  If we
don't, you get a lot of warnings at build time as the POSIX API does
not declare the prototypes with a volatile type.
 builtins/evalstring.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtins/evalstring.c b/builtins/evalstring.c
index 66926e9228d6..5c62a584fafa 100644
--- a/builtins/evalstring.c
+++ b/builtins/evalstring.c
@@ -231,7 +231,7 @@ parse_and_execute (string, from_file, flags)
   int code, lreset;
   volatile int should_jump_to_top_level, last_result;
   COMMAND *volatile command;
-  volatile sigset_t pe_sigmask;
+  sigset_t pe_sigmask;
   parse_prologue (string, flags, PE_TAG);
@@ -488,7 +488,7 @@ parse_string (string, from_file, flags, endp)
   volatile int should_jump_to_top_level;
   COMMAND *volatile command, *oglobal;
   char *ostring;
-  volatile sigset_t ps_sigmask;
+  sigset_t ps_sigmask;
   parse_prologue (string, flags, PS_TAG);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]