fix "...should be passed by reference"

Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
fix compiler warnings

Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
fix "...is assigned in constructor body."

Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>