Hi all,
I tried to build the package with current GCC6 for Fedora and the
warning showed up:
../common/mech_aes.c: In function 'aes_ctr_encrypt_update':
../common/mech_aes.c:1311:12: warning: statement is indented as if it
were guarded by... [-Wmisleading-indentation]
context->len = remain;
^~~~~~~
../common/mech_aes.c:1309:9: note: ...this 'if' clause, but it is not
if (remain != 0)
^~
There is new feature checking for misleading indentation [1]. I reviewed
this report and in this case, the behavior is ok, but only in
indentation is misleading. I propose to use fix the indentation to
silent new compiler.
[1]
http://developers.redhat.com/blog/2016/02/26/gcc-6-wmisleading-indentation-vs-goto-fail/
Regards,
--
Jakub Jelen
Security Technologies
Red Hat
commit e9b6d349784ba3294c5d0f851259a7c2b52aad07
Author: Jakub Jelen <[email protected]>
Date: Thu Mar 24 10:51:43 2016 +0100
GCC6: Do not confuse compiler with indentation
diff --git a/usr/lib/pkcs11/common/mech_aes.c b/usr/lib/pkcs11/common/mech_aes.c
index afe19e0..41b261c 100644
--- a/usr/lib/pkcs11/common/mech_aes.c
+++ b/usr/lib/pkcs11/common/mech_aes.c
@@ -1308,7 +1308,7 @@ aes_ctr_encrypt_update( SESSION *sess,
// copy the remaining 'new' input data to the context buffer
if (remain != 0)
memcpy( context->data, in_data + (in_data_len - remain), remain );
- context->len = remain;
+ context->len = remain;
}
free( clear );
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech