Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qlc.hrl causes lager to produce "Warning: a term is constructed, but never used" #562

Open
yaocl opened this issue Jul 20, 2021 · 3 comments

Comments

@yaocl
Copy link

yaocl commented Jul 20, 2021

when I include the qlc hrl, and compile test.erl
in Erlang 23.1 and lager master branch and tag 2.9.2 release
it generates Warning in every lager function call

src/test.erl:9: Warning: a term is constructed, but never used

in Erlang 23.1 and lager tag 2.9.1 release, test.erl is compiled without warning.

if I remove the -include_lib("stdlib/include/qlc.hrl"). and compile test.erl again.
the code is compiled without warning.

the test.erl is

-module(test).

-include_lib("stdlib/include/qlc.hrl").

%% API
-export([  test/0  ]).

test() ->
  lager:debug(""),
  ok.
@mworrell
Copy link
Contributor

I also see this happening with lager 3.9.2 and qlc.

@hejin1026
Copy link

this issue had fixed on tag 3.9.2.
i have this problem when i upgrade erlang 11.3 to 12.0 and use lager 3.9.1
so i search the question, and found commit on lager_transform that fixed this problem
now when i use 3.9.2, this problem is gone.
hope it can help you

@yaocl
Copy link
Author

yaocl commented Oct 21, 2021

this issue had fixed on tag 3.9.2.

just tested again in tag 3.9.2 and master branch with Erlang 23.1
the issue is not fixed yet

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

No branches or pull requests

3 participants