1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
curl/lib/vssh
Daniel Gustafsson ba82673dac checksrc: fix regexp for ASSIGNWITHINCONDITION
The regexp looking for assignments within conditions was too greedy
and matched a too long string in the case of multiple conditionals
on the same line. This is basically only a problem in single line
macros, and the code which exemplified this was essentially:

  do { if((x) != NULL) { x = NULL; } } while(0)

..where the final parenthesis of while(0) matched the regexp, and
the legal assignment in the block triggered the warning. Fix by
making the regexp less greedy by matching for the tell-tale signs
of the if statement ending.

Also remove the one occurrence where the warning was disabled due
to a construction like the above, where the warning didn't apply
when fixed.

Closes #4647
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2019-11-28 14:18:16 +01:00
..
libssh2.c lib: silence conversion warnings 2019-10-01 10:47:37 +02:00
libssh.c checksrc: fix regexp for ASSIGNWITHINCONDITION 2019-11-28 14:18:16 +01:00
ssh.h lib: Move lib/ssh.h -> lib/vssh/ssh.h 2019-11-17 23:27:39 -05:00