• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Révisionbf90c83acca6736f451807d3e231b53dc02bc57b (tree)
l'heure2020-07-03 23:00:08
AuteurPedro Alves <palves@redh...>
CommiterPedro Alves

Message de Log

Fix gdb.base/charset.exp with Clang

gdb.base/charset.exp fails to run with Clang, because of:

gdb compile failed, /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/charset.c:144:20: warning:
implicit conversion from 'int' to 'char' changes value from 162 to -94
[-Wconstant-conversion]

11, 162, 17);

/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/charset.c:151:16: warning:
implicit conversion from 'int' to 'char' changes value from 167 to -89
[-Wconstant-conversion]

167,

/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/charset.c:168:16: warning:
implicit conversion from 'int' to 'char' changes value from 167 to -89
[-Wconstant-conversion]

167,

3 warnings generated.

=== gdb Summary ===

# of untested testcases 1

Fix it by changing init_string to take unsigned char parameters.

gdb/testsuite/ChangeLog:

* gdb.base/charset.c (init_string): Change all char parameters to
unsigned char parameters.

Change Summary

Modification

--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
11 2020-07-03 Pedro Alves <palves@redhat.com>
22
3+ * gdb.base/charset.c (init_string): Change all char parameters to
4+ unsigned char parameters.
5+
6+2020-07-03 Pedro Alves <palves@redhat.com>
7+
38 * gdb.base/call-sc.exp (start_scalars_test): Use
49 prepare_for_testing and don't try compiling with -DNO_PROTOTYPES.
510 * gdb.base/overlays.c: Remove references to PARAMS.
--- a/gdb/testsuite/gdb.base/charset.c
+++ b/gdb/testsuite/gdb.base/charset.c
@@ -77,12 +77,21 @@ short short_array[3];
7777 int int_array[3];
7878 long long_array[3];
7979
80+/* These are unsigned char so we can pass down characters >127 without
81+ explicit casts or warnings. */
82+
8083 void
8184 init_string (char string[],
82- char x,
83- char alert, char backspace, char form_feed,
84- char line_feed, char carriage_return, char horizontal_tab,
85- char vertical_tab, char cent, char misc_ctrl)
85+ unsigned char x,
86+ unsigned char alert,
87+ unsigned char backspace,
88+ unsigned char form_feed,
89+ unsigned char line_feed,
90+ unsigned char carriage_return,
91+ unsigned char horizontal_tab,
92+ unsigned char vertical_tab,
93+ unsigned char cent,
94+ unsigned char misc_ctrl)
8695 {
8796 int i;
8897