From 1874624383fbbe8b4e33227f8d5dc10f0641f5ba Mon Sep 17 00:00:00 2001 From: Igor Ostaptchenko Date: Thu, 29 Jan 2026 20:12:34 -0500 Subject: [PATCH] chores:warnings --- src/bits.erl | 2 +- src/qrcode_demo.erl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bits.erl b/src/bits.erl index 4988ab3..cb3b2a7 100644 --- a/src/bits.erl +++ b/src/bits.erl @@ -15,7 +15,7 @@ -module(bits). -export([reverse/1, duplicate/2, append/1, bitlist/1, bitstring/1, stringbits/1]). --compile(export_all). +% export_all removed to avoid warnings; module already exports explicit API. reverse(Bin) -> reverse(Bin, <<>>). diff --git a/src/qrcode_demo.erl b/src/qrcode_demo.erl index aa27174..5522629 100644 --- a/src/qrcode_demo.erl +++ b/src/qrcode_demo.erl @@ -41,7 +41,7 @@ -include("qrcode.hrl"). --compile(export_all). +% export_all removed to avoid warnings; demo module is not part of the public API. -define(TTY(Term), io:format(user, "[~p] ~p~n", [?MODULE, Term])). -define(PERIOD, 30). @@ -108,7 +108,7 @@ totp(Key, Period) -> %% RFC-4226 "HOTP: An HMAC-Based One-Time Password Algorithm" %% @ref hotp(Key, Count) when is_binary(Key), is_integer(Count) -> - HS = crypto:hmac(sha, Key, <>), + HS = crypto:mac(hmac, sha, Key, <>), <<_:19/binary, _:4, Offset:4>> = HS, <<_:Offset/binary, _:1, P:31, _/binary>> = HS, HOTP = integer_to_list(P rem 1000000),