A non-void function is invoked without inspecting its return value.
Capture the result or explicitly cast the call to void if it is the expected behavior.
module top(input x, output reg y);
function int foo;
return 1;
endfunction
function int bar;
return 0;
endfunction
always @ (posedge x) begin
foo(); // Noncompliant
bar(); // Noncompliant
end
endmodule
module top(input x, output reg y);
function int foo;
return 1;
endfunction
function int bar;
return 0;
endfunction
always @ (posedge x) begin
y <= foo(); // Compliant: Return value is used
void'(bar()); // Compliant: Explicit cast to 'void'
end
endmodule