GNU bug report logs - #25677
[PATCH 01/22] oldXMenu: add missing #include <string.h>

Previous Next

Package: emacs;

Reported by: Michal Nazarewicz <mina86 <at> mina86.com>

Date: Fri, 10 Feb 2017 18:17:02 UTC

Severity: minor

Tags: patch

Done: Michal Nazarewicz <mina86 <at> mina86.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25677 in the body.
You can then email your comments to 25677 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25677; Package emacs. (Fri, 10 Feb 2017 18:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michal Nazarewicz <mina86 <at> mina86.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 10 Feb 2017 18:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michal Nazarewicz <mina86 <at> mina86.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH 01/22] oldXMenu: add missing #include <string.h>
Date: Fri, 10 Feb 2017 19:16:37 +0100
Some of the files in oldXMenu use functions from string.h without
including that header which results in compile warnings:

	ChgPane.c:46:5: warning: implicit declaration of function ‘strlen’
	ChgPane.c:46:20: warning: incompatible implicit declaration of
		built-in function ‘strlen’
	ChgSel.c:62:2: warning: implicit declaration of function ‘strlen’
	ChgSel.c:62:17: warning: incompatible implicit declaration of built-in
		function ‘strlen’
	Create.c:220:5: warning: implicit declaration of function ‘strcmp’
	InsPane.c:65:5: warning: implicit declaration of function ‘strlen’
	InsPane.c:65:20: warning: incompatible implicit declaration of
		built-in function ‘strlen’
	InsSel.c:68:5: warning: implicit declaration of function ‘strlen’
	InsSel.c:68:20: warning: incompatible implicit declaration of built-in
		function ‘strlen’
	InsSel.c:75:5: warning: implicit declaration of function ‘strcmp’

Add the necessary ‘#include <string.h>’.

oldXMenu/ChgPane.c, oldXMenu/ChgSel.c, oldXMenu/Create.c, oldXMenu/InsPane.c,
oldXMenu/InsSel.c: add missing #include <string.h>
---
 oldXMenu/ChgPane.c | 1 +
 oldXMenu/ChgSel.c  | 1 +
 oldXMenu/Create.c  | 1 +
 oldXMenu/InsPane.c | 1 +
 oldXMenu/InsSel.c  | 1 +
 5 files changed, 5 insertions(+)

Unless there are some objections I’ll commit this in a few days.

diff --git a/oldXMenu/ChgPane.c b/oldXMenu/ChgPane.c
index d2977b73faf..733f65950f5 100644
--- a/oldXMenu/ChgPane.c
+++ b/oldXMenu/ChgPane.c
@@ -14,6 +14,7 @@
  */
 
 #include "XMenuInt.h"
+#include <string.h>
 
 int
 XMenuChangePane(register XMenu *menu, register int p_num, char *label)
diff --git a/oldXMenu/ChgSel.c b/oldXMenu/ChgSel.c
index d24e61f56d5..5a46b5cf587 100644
--- a/oldXMenu/ChgSel.c
+++ b/oldXMenu/ChgSel.c
@@ -14,6 +14,7 @@
  */
 
 #include "XMenuInt.h"
+#include <string.h>
 
 int
 XMenuChangeSelection(Display *display, register XMenu *menu, register int p_num, register int s_num, char *data, int data_sw, char *label, int label_sw)
diff --git a/oldXMenu/Create.c b/oldXMenu/Create.c
index 0e72a2d2e58..a0913685365 100644
--- a/oldXMenu/Create.c
+++ b/oldXMenu/Create.c
@@ -31,6 +31,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "XMenuInt.h"
 #include <stdlib.h>
+#include <string.h>
 
 #ifdef EMACS_BITMAP_FILES
 #include "../src/bitmaps/dimple1.xbm"
diff --git a/oldXMenu/InsPane.c b/oldXMenu/InsPane.c
index d8470f3a5bf..da92f49aa77 100644
--- a/oldXMenu/InsPane.c
+++ b/oldXMenu/InsPane.c
@@ -15,6 +15,7 @@
  */
 
 #include "XMenuInt.h"
+#include <string.h>
 
 int
 XMenuInsertPane(register XMenu *menu, register int p_num, char *label, int active)
diff --git a/oldXMenu/InsSel.c b/oldXMenu/InsSel.c
index 66f4968197d..f5380437958 100644
--- a/oldXMenu/InsSel.c
+++ b/oldXMenu/InsSel.c
@@ -14,6 +14,7 @@
  */
 
 #include "XMenuInt.h"
+#include <string.h>
 
 int
 XMenuInsertSelection(register XMenu *menu, register int p_num, register int s_num, char *data, char *label, int active)
-- 
2.11.0.483.g087da7b7c-goog





Reply sent to Michal Nazarewicz <mina86 <at> mina86.com>:
You have taken responsibility. (Wed, 15 Feb 2017 16:14:02 GMT) Full text and rfc822 format available.

Notification sent to Michal Nazarewicz <mina86 <at> mina86.com>:
bug acknowledged by developer. (Wed, 15 Feb 2017 16:14:03 GMT) Full text and rfc822 format available.

Message #10 received at 25677-close <at> debbugs.gnu.org (full text, mbox):

From: Michal Nazarewicz <mina86 <at> mina86.com>
To: 25677-close <at> debbugs.gnu.org
Subject: Re: [PATCH 01/22] oldXMenu: add missing #include <string.h>
Date: Wed, 15 Feb 2017 17:13:13 +0100
On Fri, Feb 10 2017, Michal Nazarewicz wrote:
> Some of the files in oldXMenu use functions from string.h without
> including that header which results in compile warnings:
>
> 	ChgPane.c:46:5: warning: implicit declaration of function ‘strlen’
> 	ChgPane.c:46:20: warning: incompatible implicit declaration of
> 		built-in function ‘strlen’
> 	ChgSel.c:62:2: warning: implicit declaration of function ‘strlen’
> 	ChgSel.c:62:17: warning: incompatible implicit declaration of built-in
> 		function ‘strlen’
> 	Create.c:220:5: warning: implicit declaration of function ‘strcmp’
> 	InsPane.c:65:5: warning: implicit declaration of function ‘strlen’
> 	InsPane.c:65:20: warning: incompatible implicit declaration of
> 		built-in function ‘strlen’
> 	InsSel.c:68:5: warning: implicit declaration of function ‘strlen’
> 	InsSel.c:68:20: warning: incompatible implicit declaration of built-in
> 		function ‘strlen’
> 	InsSel.c:75:5: warning: implicit declaration of function ‘strcmp’
>
> Add the necessary ‘#include <string.h>’.
>
> oldXMenu/ChgPane.c, oldXMenu/ChgSel.c, oldXMenu/Create.c, oldXMenu/InsPane.c,
> oldXMenu/InsSel.c: add missing #include <string.h>

Pushed.

> ---
>  oldXMenu/ChgPane.c | 1 +
>  oldXMenu/ChgSel.c  | 1 +
>  oldXMenu/Create.c  | 1 +
>  oldXMenu/InsPane.c | 1 +
>  oldXMenu/InsSel.c  | 1 +
>  5 files changed, 5 insertions(+)
>
> Unless there are some objections I’ll commit this in a few days.
>
> diff --git a/oldXMenu/ChgPane.c b/oldXMenu/ChgPane.c
> index d2977b73faf..733f65950f5 100644
> --- a/oldXMenu/ChgPane.c
> +++ b/oldXMenu/ChgPane.c
> @@ -14,6 +14,7 @@
>   */
>  
>  #include "XMenuInt.h"
> +#include <string.h>
>  
>  int
>  XMenuChangePane(register XMenu *menu, register int p_num, char *label)
> diff --git a/oldXMenu/ChgSel.c b/oldXMenu/ChgSel.c
> index d24e61f56d5..5a46b5cf587 100644
> --- a/oldXMenu/ChgSel.c
> +++ b/oldXMenu/ChgSel.c
> @@ -14,6 +14,7 @@
>   */
>  
>  #include "XMenuInt.h"
> +#include <string.h>
>  
>  int
>  XMenuChangeSelection(Display *display, register XMenu *menu, register int p_num, register int s_num, char *data, int data_sw, char *label, int label_sw)
> diff --git a/oldXMenu/Create.c b/oldXMenu/Create.c
> index 0e72a2d2e58..a0913685365 100644
> --- a/oldXMenu/Create.c
> +++ b/oldXMenu/Create.c
> @@ -31,6 +31,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  
>  #include "XMenuInt.h"
>  #include <stdlib.h>
> +#include <string.h>
>  
>  #ifdef EMACS_BITMAP_FILES
>  #include "../src/bitmaps/dimple1.xbm"
> diff --git a/oldXMenu/InsPane.c b/oldXMenu/InsPane.c
> index d8470f3a5bf..da92f49aa77 100644
> --- a/oldXMenu/InsPane.c
> +++ b/oldXMenu/InsPane.c
> @@ -15,6 +15,7 @@
>   */
>  
>  #include "XMenuInt.h"
> +#include <string.h>
>  
>  int
>  XMenuInsertPane(register XMenu *menu, register int p_num, char *label, int active)
> diff --git a/oldXMenu/InsSel.c b/oldXMenu/InsSel.c
> index 66f4968197d..f5380437958 100644
> --- a/oldXMenu/InsSel.c
> +++ b/oldXMenu/InsSel.c
> @@ -14,6 +14,7 @@
>   */
>  
>  #include "XMenuInt.h"
> +#include <string.h>
>  
>  int
>  XMenuInsertSelection(register XMenu *menu, register int p_num, register int s_num, char *data, char *label, int active)
> -- 
> 2.11.0.483.g087da7b7c-goog
>

-- 
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 16 Mar 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 100 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.