besser82 / libxcrypt

Extended crypt library for descrypt, md5crypt, bcrypt, and others
GNU Lesser General Public License v2.1
189 stars 52 forks source link

lib/alg-gost3411-core.c: fix conversion error seen by sensitive compilers #119

Closed gwbres closed 3 years ago

gwbres commented 3 years ago

Some compilers might be sensitive and raise an Warning/error on this line.

Signed-off-by: Guillaume W. Bres guillaume.bressaix@gmail.com

codecov[bot] commented 3 years ago

Codecov Report

Merging #119 (c7bf2cf) into develop (16a5025) will increase coverage by 0.07%. The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #119      +/-   ##
===========================================
+ Coverage    92.61%   92.69%   +0.07%     
===========================================
  Files           32       32              
  Lines         3617     3614       -3     
  Branches      2116     2115       -1     
===========================================
  Hits          3350     3350              
+ Misses         210      208       -2     
+ Partials        57       56       -1     
Impacted Files Coverage Δ
lib/alg-gost3411-2012-core.c 98.78% <ø> (ø)
lib/crypt-yescrypt.c 79.54% <0.00%> (+5.07%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 16a5025...c7bf2cf. Read the comment docs.

besser82 commented 3 years ago

Thank you for the contribution!

gwbres commented 3 years ago

@besser82, thank you for merging this little patch!

I added your package into Buildroot, a tool to generate embedded linux images easily. I personally use your package on the beaglebone, bb-black and the zynq7. This problem was seen on "mips32" platform though.

Like you, I prefer having all warnings & errors available when building, it's harder to pass & the code is supposedly cleaner. But on the other hand, having -Werror pass on a couple machines (like yours, & the one I tested, does not guarantee it does on others (like mips for instance, who was tacky on this particular "cast"). The Buildroot guys had me disable the -Werror in configure at the moment