unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: 71786@debbugs.gnu.org
Subject: bug#71786: 30.0.60; Compiler warnings in the Cygwin-w32 build
Date: Wed, 26 Jun 2024 14:22:43 -0400	[thread overview]
Message-ID: <02c4cbd6-dddb-4dc5-a85e-9abbbc46e6d2@cornell.edu> (raw)

The following warnings occur in the Cygwin-w32 build, on both the
emacs-30 and the master branch:

../../src/w32fns.c: At top level:
../../src/w32fns.c:10581:1: warning: no previous prototype for ‘w32_get_resource’ 
[-Wmissing-prototypes]
10581 | w32_get_resource (const char *key, const char *name, LPDWORD lpdwtype)
       | ^~~~~~~~~~~~~~~~
../../src/w32fns.c:11288: warning: macro "DEFAULT_IMAGE_BASE" is not used [-Wunused-macros]
11288 | # define DEFAULT_IMAGE_BASE (ptrdiff_t)0x01000000
       |

This fixes them on both branches:

diff --git a/src/cygw32.h b/src/cygw32.h
index cc3414a39d92..2f265cab4adf 100644
--- a/src/cygw32.h
+++ b/src/cygw32.h
@@ -35,5 +35,6 @@ #define CYGW32_H

  extern void syms_of_cygw32 (void);
  extern char * w32_strerror (int error_no);
+extern LPBYTE w32_get_resource (const char * key, const char * name, LPDWORD type);

  #endif /* CYGW32_H */
diff --git a/src/w32fns.c b/src/w32fns.c
index b784a9a563d7..4c2f18abd084 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -11284,7 +11284,7 @@ #define BACKTRACE_LIMIT_MAX 62
     configure.ac.  */
  #if defined MINGW_W64 && EMACS_INT_MAX > LONG_MAX
  # define DEFAULT_IMAGE_BASE (ptrdiff_t)0x400000000
-#else  /* 32-bit MinGW build */
+#elif !defined CYGWIN  /* 32-bit MinGW build */
  # define DEFAULT_IMAGE_BASE (ptrdiff_t)0x01000000
  #endif

OK for the emacs-30 branch?

Ken





             reply	other threads:[~2024-06-26 18:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26 18:22 Ken Brown [this message]
2024-06-26 18:41 ` bug#71786: 30.0.60; Compiler warnings in the Cygwin-w32 build Eli Zaretskii
2024-06-26 20:01   ` Ken Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=02c4cbd6-dddb-4dc5-a85e-9abbbc46e6d2@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=71786@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).