[snmp] Fix example 2 regarding compiler warnings
[snmp] Fix example 2 regarding compiler warnings

The second example (ex2) used deprecated functions.

OTP-16716

g-andrade/otp,vinoski/otp,isvilen/otp,electricimp/otp,getong/otp,uabboli/otp,jj1bdx/otp,erlang/otp,vladdu/otp,isvilen/otp,kvakvs/otp,jj1bdx/otp,emacsmirror/erlang,vladdu/otp,lrascao/otp,uabboli/otp,jj1bdx/otp,rlipscombe/otp,lrascao/otp,dumbbell/otp,rlipscombe/otp,dumbbell/otp,rlipscombe/otp,getong/otp,rlipscombe/otp,jj1bdx/otp,potatosalad/otp,getong/otp,potatosalad/otp,dgud/otp,mikpe/otp,isvilen/otp,ferd/otp,g-andrade/otp,jj1bdx/otp,getong/otp,getong/otp,bjorng/otp,vladdu/otp,jj1bdx/otp,getong/otp,dgud/otp,electricimp/otp,mikpe/otp,erlang/otp,dumbbell/otp,potatosalad/otp,kvakvs/otp,jj1bdx/otp,vladdu/otp,dumbbell/otp,vinoski/otp,bjorng/otp,mikpe/otp,lrascao/otp,getong/otp,ferd/otp,vinoski/otp,electricimp/otp,ferd/otp,erlang/otp,emacsmirror/erlang,lrascao/otp,mikpe/otp,dumbbell/otp,bjorng/otp,uabboli/otp,dgud/otp,ferd/otp,uabboli/otp,g-andrade/otp,electricimp/otp,dgud/otp,bjorng/otp,dgud/otp,uabboli/otp,getong/otp,kvakvs/otp,potatosalad/otp,ferd/otp,g-andrade/otp,uabboli/otp,potatosalad/otp,potatosalad/otp,rlipscombe/otp,rlipscombe/otp,erlang/otp,g-andrade/otp,erlang/otp,dgud/otp,erlang/otp,potatosalad/otp,kvakvs/otp,emacsmirror/erlang,bjorng/otp,rlipscombe/otp,kvakvs/otp,potatosalad/otp,vinoski/otp,getong/otp,electricimp/otp,electricimp/otp,jj1bdx/otp,vladdu/otp,emacsmirror/erlang,erlang/otp,kvakvs/otp,vinoski/otp,bjorng/otp,g-andrade/otp,g-andrade/otp,ferd/otp,vinoski/otp,uabboli/otp,jj1bdx/otp,ferd/otp,mikpe/otp,isvilen/otp,lrascao/otp,erlang/otp,rlipscombe/otp,erlang/otp,emacsmirror/erlang,dumbbell/otp,g-andrade/otp,dgud/otp,vladdu/otp,potatosalad/otp,lrascao/otp,ferd/otp,dumbbell/otp,isvilen/otp,vinoski/otp,uabboli/otp,getong/otp,lrascao/otp,vinoski/otp,dumbbell/otp,emacsmirror/erlang,dumbbell/otp,uabboli/otp,bjorng/otp,bjorng/otp,lrascao/otp,vinoski/otp,emacsmirror/erlang,lrascao/otp,electricimp/otp,dumbbell/otp,rlipscombe/otp,vladdu/otp,bjorng/otp,isvilen/otp,dgud/otp,g-andrade/otp,vladdu/otp,isvilen/otp,electricimp/otp,emacsmirror/erlang,mikpe/otp,isvilen/otp,isvilen/otp,kvakvs/otp,dgud/otp,mikpe/otp,mikpe/otp,rlipscombe/otp,mikpe/otp,ferd/otp,mikpe/otp,bjorng/otp,vinoski/otp,emacsmirror/erlang,kvakvs/otp,erlang/otp,kvakvs/otp,isvilen/otp,jj1bdx/otp,dgud/otp,g-andrade/otp,potatosalad/otp,emacsmirror/erlang,vladdu/otp,electricimp/otp