[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Address some compiler warnings
From: |
Gavin D. Smith |
Subject: |
branch master updated: Address some compiler warnings |
Date: |
Wed, 19 Oct 2022 10:43:55 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 02ae9b5c3b Address some compiler warnings
02ae9b5c3b is described below
commit 02ae9b5c3b30029f9b12cbb5fba14259f37c19a8
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Oct 19 15:43:47 2022 +0100
Address some compiler warnings
* info/infopath.c (infopath_add),
* info/session.c (menu_digit, forward_move_node_structure):
Add brackets around assignment in condition.
* info/man.c (check_manpage_node): Remove unused variables.
---
ChangeLog | 9 +++++++++
info/infopath.c | 2 +-
info/man.c | 7 +++----
info/session.c | 4 ++--
4 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 97d2fa03c6..278de8abae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-10-19 Gavin Smith <gavinsmith0123@gmail.com>
+
+ Address some compiler warnings
+
+ * info/infopath.c (infopath_add),
+ * info/session.c (menu_digit, forward_move_node_structure):
+ Add brackets around assignment in condition.
+ * info/man.c (check_manpage_node): Remove unused variables.
+
2022-10-19 Gavin Smith <gavinsmith0123@gmail.com>
* README-hacking: update advice on configuring for compiler warnings
diff --git a/info/infopath.c b/info/infopath.c
index f0dd81a8a2..d48a1588bb 100644
--- a/info/infopath.c
+++ b/info/infopath.c
@@ -199,7 +199,7 @@ infopath_add (char *path)
int idx = 0;
char *dirname;
- while (dirname = extract_colon_unit (path, &idx))
+ while ((dirname = extract_colon_unit (path, &idx)))
{
if (!strcmp ("PATH", dirname))
{
diff --git a/info/man.c b/info/man.c
index 841e285324..c4877ac860 100644
--- a/info/man.c
+++ b/info/man.c
@@ -71,7 +71,6 @@ size_t manpage_node_slots = 0;
int
check_manpage_node (char *pagename)
{
- char *cmd;
pid_t child;
int pid_status = 0;
NODE *man_node;
@@ -82,14 +81,14 @@ check_manpage_node (char *pagename)
if (!child)
{
- int ret;
+ char *formatter;
(void)! freopen (NULL_DEVICE, "w", stdout);
(void)! freopen (NULL_DEVICE, "w", stderr);
/* avoid "unused result" warning with ! operator */
- char *formatter = find_man_formatter();
+ formatter = find_man_formatter();
if (!formatter)
exit (1);
- ret = execl (formatter, formatter, "-w", pagename, (void *) 0);
+ execl (formatter, formatter, "-w", pagename, (void *) 0);
exit (2); /* exec failed */
}
else
diff --git a/info/session.c b/info/session.c
index 341f3f7af1..42285b0bf3 100644
--- a/info/session.c
+++ b/info/session.c
@@ -2212,7 +2212,7 @@ menu_digit (WINDOW *window, int key)
return;
has_menu:
- if (entry = select_menu_digit (window, key))
+ if ((entry = select_menu_digit (window, key)))
info_select_reference (window, entry);
else if (key == '0')
/* Don't print "There aren't 0 items in this menu" */
@@ -3093,7 +3093,7 @@ forward_move_node_structure (WINDOW *window, int
behaviour)
{
REFERENCE *entry;
- if (entry = select_menu_digit (window, '1'))
+ if ((entry = select_menu_digit (window, '1')))
{
info_select_reference (window, entry);
return 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Address some compiler warnings,
Gavin D. Smith <=