1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

check unused and unmodified vars in all modules, not just main

This commit is contained in:
Alexander Medvednikov
2019-12-06 15:24:53 +03:00
parent bdaa421e8a
commit c8d111924d
31 changed files with 133 additions and 119 deletions

View File

@@ -48,7 +48,7 @@ pub fn new_cbc(b AesCipher, iv []byte) AesCbc {
pub fn (x &AesCbc) block_size() int { return x.block_size }
pub fn (x mut AesCbc) encrypt_blocks(dst mut []byte, src_ []byte) {
pub fn (x &AesCbc) encrypt_blocks(dst mut []byte, src_ []byte) {
mut src := src_
if src.len%x.block_size != 0 {
panic('crypto.cipher: input not full blocks')
@@ -124,7 +124,7 @@ pub fn (x mut AesCbc) decrypt_blocks(dst mut []byte, src []byte) {
x.tmp = x.iv
}
fn (x mut AesCbc) set_iv(iv []byte) {
fn (x &AesCbc) set_iv(iv []byte) {
if iv.len != x.iv.len {
panic('cipher: incorrect length IV')
}