Skip to content

Fixed function detection. check_function failed to compile due to clang -Wint-conversion warning became error. - #1269

Merged
flyingmutant merged 1 commit into
cmus:masterfrom
VladislavGrudinin:clang-build-fix
Jul 15, 2023
Merged

flyingmutant merged 1 commit into
cmus:masterfrom
VladislavGrudinin:clang-build-fix

Conversation

@VladislavGrudinin

Copy link
Copy Markdown
Contributor

In recent clang version the -Wint-conversion warning became an error. So the function detection doesn't work anymore.
Compiling this code with clang
char resizeterm(); int main(int argc, char *argv[]) { return resizeterm; }
results in error:
main.c:1:62: error: incompatible pointer to integer conversion returning 'char ()' from a function with result type 'int' [-Wint-conversion]

@pgaskin pgaskin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The -Wint-conversion warning diagnostic for implicit int <-> pointer conversions now defaults to an error in all C language modes. It may be downgraded to a warning with -Wno-error=int-conversion, or disabled entirely with -Wno-int-conversion.

https://releases.llvm.org/15.0.0/tools/clang/docs/ReleaseNotes.html

@pgaskin

pgaskin commented Jul 15, 2023

Copy link
Copy Markdown
Member

@flyingmutant

@flyingmutant
flyingmutant merged commit 4123b54 into cmus:master Jul 15, 2023
@VladislavGrudinin
VladislavGrudinin deleted the clang-build-fix branch July 15, 2023 16:43
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request Jan 15, 2024
Apply uptream patch to fix function detection. check_function failed to
compile due to clang -Wint-conversion warning became error.

See also: cmus/cmus#1269

PR:		276318
Reported by:	Ivan <[email protected]>
camachat pushed a commit to camachat/freebsd-ports that referenced this pull request Jul 22, 2026
Apply uptream patch to fix function detection. check_function failed to
compile due to clang -Wint-conversion warning became error.

See also: cmus/cmus#1269

PR:		276318
Reported by:	Ivan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants