Skip to content

Commit

Permalink
Fixed #74 and more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan A. Haubenthal committed Apr 23, 2024
1 parent 5b190f3 commit d101d69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/compiler/os.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ int os::prog_exec(std::string exe, std::vector<std::string> &args)

// Ignore INT and QUIT signals in the parent process:
sigset_t oldmask, newmask;
struct sigaction sa = {SIG_IGN, 0}, oldint, oldquit;
struct sigaction sa = {{SIG_IGN}, 0}, oldint, oldquit;
sigaction(SIGINT, &sa, &oldint);
sigaction(SIGQUIT, &sa, &oldquit);

Expand All @@ -154,7 +154,7 @@ int os::prog_exec(std::string exe, std::vector<std::string> &args)
if(pid == 0)
{
// Child, reset INT, QUIT and CHLD signals to default
struct sigaction sa = {SIG_DFL, 0};
struct sigaction sa = {{SIG_DFL}, 0};
sigaction(SIGINT, &sa, nullptr);
sigaction(SIGQUIT, &sa, nullptr);
sigprocmask(SIG_SETMASK, &oldmask, nullptr);
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ class parse
{
if(c == '"')
expand.stext += "\"\"";
else if(c == 155)
else if((unsigned) c == 155)
{
in = false;
expand.stext += std::string("\"$") + hexd(c >> 4) + hexd(c);
Expand All @@ -482,7 +482,7 @@ class parse
}
else
{
if(c == 155 || c == '"')
if((unsigned) c == 155 || c == '"')
expand.stext += std::string("$") + hexd(c >> 4) + hexd(c);
else
{
Expand Down

0 comments on commit d101d69

Please sign in to comment.