Unused cursors should be removed
ZPA rule for PL/SQL and Oracle SQL · UnusedCursor
A cursor that is declared and never used is dead code. Its query is still read, reviewed and kept in sync with the tables by whoever maintains the code, for nothing.
This rule reports a local cursor, or one of a package body, that no code of the file uses: not opened, fetched, closed or iterated by a cursor FOR loop, and not named by an attribute (%ISOPEN, %ROWTYPE...). Cursors of a package specification are not reported, and neither is a cursor of a package body declared with RETURN, which may implement a cursor of the specification. As for variables, a cursor is reported only when the analysis proves it unused.
Examples
declare
cursor c_racks is select id from rack where active = 'Y';
cursor c_bins is select id from bin; -- Noncompliant
begin
for r in c_racks loop
refresh_rack(r.id);
end loop;
end;
declare
cursor c_racks is select id from rack where active = 'Y';
begin
for r in c_racks loop
refresh_rack(r.id);
end loop;
end;