Bug 270150 - audio/xwave: fix build
Summary: audio/xwave: fix build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-12 08:02 UTC by Martin Kraft
Modified: 2023-03-15 17:38 UTC (History)
1 user (show)

See Also:


Attachments
Additional patch file to overcome compiler error about type conversion NULL->0 (702 bytes, patch)
2023-03-12 08:02 UTC, Martin Kraft
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Kraft 2023-03-12 08:02:10 UTC
Created attachment 240788 [details]
Additional patch file to overcome compiler error about type conversion NULL->0

Since Feb 10, pkg-fallout claims that xwave is no more compilable with FreeBSD 14.0 CURRENT.
The problem is an implicit type conversion:
StrToPmap.c:143:19: error: incompatible pointer to integer conversion assigning to
'XrmName' (aka 'int') from 'void *' [-Wint-conversion]
      xrm_name[1] = NULL;
                  ^ ~~~~
StrToPmap.c:145:20: error: incompatible pointer to integer conversion assigning to
'XrmClass' (aka 'int') from 'void *' [-Wint-conversion]
      xrm_class[1] = NULL;
                   ^ ~~~~
This patch corrects the type, so i guess, the compiler error will disappear. I do not have a suitable test environment.

Since the xwave source code itself is not more maintained since 1998, the code
is far away from today's coding standard.
Comment 1 Fernando Apesteguía freebsd_committer freebsd_triage 2023-03-15 17:38:01 UTC
Committed,

Thanks!
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-03-15 17:38:05 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b9452f5c1460ff776391db8ce37ec335f17522c5

commit b9452f5c1460ff776391db8ce37ec335f17522c5
Author:     Martin Kraft <a0516@marimga.de>
AuthorDate: 2023-03-15 12:11:43 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-03-15 17:33:26 +0000

    audio/xwave: fix build

    The problem is an implicit type conversion:
    StrToPmap.c:143:19: error: incompatible pointer to integer conversion assigning
    to 'XrmName' (aka 'int') from 'void *' [-Wint-conversion]
          xrm_name[1] = NULL;

    PR:             270150
    Reported by:    a0516@marimga.de (maintainer)

 audio/xwave/files/patch-FWF_StrToPmap (new) | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)