Skip to content

M4 build with DEBUG=1 gives fatal warning in wiznet5k driver #1486

@dhalbert

Description

@dhalbert

When doing make -j4 BOARD=metro_m4_express DEBUG=1, I get this fatal warning:

../../drivers/wiznet5k/internet/dhcp/dhcp.c: In function 'parseDHCPMSG':
../../drivers/wiznet5k/internet/dhcp/dhcp.c:670:9: error: 'type' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  return type;
         ^~~~
cc1: all warnings being treated as errors
../../py/mkrules.mk:55: recipe for target 'build-metro_m4_express/drivers/wiznet5k/internet/dhcp/dhcp.o' failed

Doesn't fail without DEBUG=1. I got around this temporarily by setting type = 0; in its declaration. But the code logic does seem flawed, I think, based on the outer if statement.

@nickzoic

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions