Skip to content

Compiler warning issued when MDNS_MAX_SERVICES is 0 (IDFGH-13222) #611

Closed
@gudvinr

Description

@gudvinr

Answers checklist.

  • I have read the documentation for esp-protocols components and the issue is not addressed there.
  • I have updated my esp-protocols branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

What component are you using? If you choose Other, provide details in More Information.

mDNS

component version

1.3.2

IDF version.

5.2.2

More Information.

There's a check in mdns.c:340 that uses MDNS_MAX_SERVICES value in runtime.

If it's set to 0 (when you only need domain resolution and not DNS-SD), you get a warning:
comparison is always true due to limited range of data type [-Wtype-limits]

Instead _mdns_can_add_more_services can return false straight away if MDNS_MAX_SERVICES defined as 0.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions