Commit c913e4d
committed
jtag: fix build with configure --enable-verbose
With flag --enable-verbose, configure enables compiling some
conditional code that with new gcc triggers an error:
error: '%04x' directive output may be truncated writing
between 4 and 8 bytes into a region of size 5
[-Werror=format-truncation=]
Extend the buffer to contain the full 8 bytes of %04x on a 'int'
and change the limit in snprintf.
Skip the intermediate buffer 's[4]'.
Align the code to the coding style.
Change-Id: Ifc8a6e4686555578a7355a1f6049471fd5e31913
Signed-off-by: Antonio Borneo <[email protected]>
Reported-by: Karl Hammar <[email protected]>
Reported-by: Tommy Murphy <[email protected]>
Fixes: https://sourceforge.net/p/openocd/tickets/376/
Reviewed-on: https://review.openocd.org/c/openocd/+/7403
Tested-by: jenkins
Reviewed-by: Tomas Vanek <[email protected]>1 parent 77c7abe commit c913e4d
2 files changed
+10
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
776 | 776 | | |
777 | 777 | | |
778 | 778 | | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
| 779 | + | |
783 | 780 | | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
790 | 785 | | |
791 | 786 | | |
792 | 787 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
796 | 796 | | |
797 | 797 | | |
798 | 798 | | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
| 799 | + | |
803 | 800 | | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
810 | 805 | | |
811 | 806 | | |
812 | 807 | | |
| |||
0 commit comments