Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

Fix implicit function declaration (build error for Xcode 12+) - #8

Open
chrstphrchvz wants to merge 1 commit into
GPGTools:masterfrom
chrstphrchvz:patch-1
Open

Fix implicit function declaration (build error for Xcode 12+)#8
chrstphrchvz wants to merge 1 commit into
GPGTools:masterfrom
chrstphrchvz:patch-1

Conversation

@chrstphrchvz

@chrstphrchvz chrstphrchvz commented Nov 13, 2020

Copy link
Copy Markdown

(Error originally reported at MacPorts: https://trac.macports.org/ticket/61421)

As of Xcode 12, implicit function declarations are errors rather than warnings:

GPGTools-pinentry-mac-c5b5260/Source/pinentry-current/pinentry/pinentry-curses.c:1094:4: error:
   implicit declaration of function 'secmem_free' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           secmem_free (pin_utf8);
           ^

For reasons similar to #7, pinentry-curses.c needs to include "memory.h" (rather than <memory.h>) to find the declaration for secmem_free(). (On macOS and other BSD OSes, a <memory.h> system header exists and merely includes <string.h>.)

As of Xcode 12, implicit function declarations are errors rather than
warnings. For reasons similar to GPGTools#7, pinentry-curses.c needs to include
"memory.h" (rather than <memory.h>) to find the declaration for
secmem_free(). (On macOS and other BSD OSes, a <memory.h> system header
exists and merely includes <string.h>.)
@chrstphrchvz chrstphrchvz changed the title Fix implicit function declaration Fix implicit function declaration (build error for Xcode 12+) Nov 13, 2020
@sirn sirn mentioned this pull request Dec 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant