Skip to content

Conversation

@NAR
Copy link

@NAR NAR commented Mar 16, 2020

This pull request fixes two sets of dialyzer warnings:

  • It looks like the time field in the txq record can actually be undefined (for example when the rx2_rf exported function is called), so update the typespec to let the time to be undefined.
  • In the inc(undefined) clause in lorawan_utils the Num parameter could never be undefined (unless after a database upgrade?).

Generally, are you interested in similar dialyzer-related cleanups?

The time field in the txq record can actually be undefined (for example
when the rx2_rf exported function is called), so update the typespec to
enable the time to be undefined.
event_args(Event) when is_binary(Event) ->
{Event, undefined}.

inc(undefined) -> 1;
Copy link
Owner

Choose a reason for hiding this comment

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

This has a reason. The dialyzer is wrong when saying this will never be used.

Copy link
Author

Choose a reason for hiding this comment

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

OK, I'm removing this commit.

@NAR NAR requested a review from gotthardp March 17, 2020 08:56
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.

2 participants