Skip to content

inet_pton, inet_ntop: drop declarations when unused#18043

Closed
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:difconst
Closed

inet_pton, inet_ntop: drop declarations when unused#18043
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:difconst

Conversation

@vszakats
Copy link
Copy Markdown
Member

@vszakats vszakats commented Jul 27, 2025

Do not declare local inet_pton/inet_ntop implementations when they are
not used. In this case the same symbol is defined as a macro and mapped
to the system implementation.

Syncing this with their definitions.

Seen in the VisualStudioSolution (VS2013) job on AppVeyor:
```
3>..\..\..\..\lib\hostip.c(148): warning C4090: 'function' : different 'const' qualifiers [C:\projects\curl\projects\Windows\VC12\lib\libcurl.vcxproj]
3>..\..\..\..\lib\hostip.c(155): warning C4090: 'function' : different 'const' qualifiers [C:\projects\curl\projects\Windows\VC12\lib\libcurl.vcxproj]
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/52470650/job/gslnjrdxnd8b9mtv#L180
@vszakats vszakats marked this pull request as draft July 27, 2025 22:04
@vszakats vszakats added build Windows Windows-specific labels Jul 27, 2025
@vszakats vszakats changed the title hostip: try fixing 'different const qualifiers' warning hostip: try fixing 'different const qualifiers' warnings Jul 27, 2025
@vszakats vszakats added tidy-up and removed Windows Windows-specific labels Jul 27, 2025
@vszakats vszakats changed the title hostip: try fixing 'different const qualifiers' warnings inet_pton, inet_ntop: drop declarations when unused Jul 27, 2025
@vszakats vszakats marked this pull request as ready for review July 27, 2025 22:39
@vszakats vszakats closed this in 061c819 Jul 27, 2025
@vszakats vszakats deleted the difconst branch July 27, 2025 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant