質問編集履歴
2
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -98,7 +98,7 @@
|
|
98
98
|
|
99
99
|
|
100
100
|
|
101
|
-
エラー
|
101
|
+
エラー(テストコードにconstを付けた結果)
|
102
102
|
|
103
103
|
```ここに言語を入力
|
104
104
|
|
1
間違いを訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -102,180 +102,102 @@
|
|
102
102
|
|
103
103
|
```ここに言語を入力
|
104
104
|
|
105
|
-
fixture.c:49:29: warning:
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
fixture.c:4
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
^
|
116
|
-
|
117
|
-
fixture.c:50:
|
118
|
-
|
119
|
-
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
120
|
-
|
121
|
-
~~~~~~~~~~~~~~~~~~~~~~~~
|
122
|
-
|
123
|
-
fixture.c:36:3
|
124
|
-
|
125
|
-
printf("
|
126
|
-
|
127
|
-
~~ ^~~
|
128
|
-
|
129
|
-
fixture.c:5
|
130
|
-
|
131
|
-
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
132
|
-
|
133
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
134
|
-
|
135
|
-
fixture.c:3
|
136
|
-
|
137
|
-
printf("
|
138
|
-
|
139
|
-
~~
|
140
|
-
|
141
|
-
fixture.c:59:
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
fixture.c:
|
148
|
-
|
149
|
-
int
|
150
|
-
|
151
|
-
^
|
152
|
-
|
153
|
-
fixture.c:
|
154
|
-
|
155
|
-
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
156
|
-
|
157
|
-
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
158
|
-
|
159
|
-
fixture.c:3
|
160
|
-
|
161
|
-
printf("Expected %i\n", exp); \
|
162
|
-
|
163
|
-
~~ ^~~
|
164
|
-
|
165
|
-
fixture.c:
|
166
|
-
|
167
|
-
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
168
|
-
|
169
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
|
170
|
-
|
171
|
-
fixture.c:3
|
172
|
-
|
173
|
-
printf("Submitted %i\n\n", sub); \
|
174
|
-
|
175
|
-
~~ ^~~
|
176
|
-
|
177
|
-
fixture.c:
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
fixture.c:4
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
^
|
188
|
-
|
189
|
-
fixture.c:
|
190
|
-
|
191
|
-
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
192
|
-
|
193
|
-
~~~~~~~~~~~~~~~~~~~~~~~~
|
194
|
-
|
195
|
-
fixture.c:36:3
|
196
|
-
|
197
|
-
printf("
|
198
|
-
|
199
|
-
~~ ^~~
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
204
|
-
|
205
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
|
206
|
-
|
207
|
-
fixture.c:37:36: note: expanded from macro 'ASSERT_ARR_EQ'
|
208
|
-
|
209
|
-
printf("Submitted %i\n\n", sub); \
|
210
|
-
|
211
|
-
~~ ^~~
|
212
|
-
|
213
|
-
fixture.c:80:29: warning: passing 'const int [7]' to parameter of type 'int *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
|
214
|
-
|
215
|
-
int *submission = solve(test_arr, 7, &sub_len);
|
216
|
-
|
217
|
-
^~~~~~~~
|
218
|
-
|
219
|
-
fixture.c:41:17: note: passing argument to parameter 'arrin' here
|
220
|
-
|
221
|
-
int* solve(int* arrin, size_t szin, size_t *szout);
|
222
|
-
|
223
|
-
^
|
224
|
-
|
225
|
-
fixture.c:81:29: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
|
226
|
-
|
227
|
-
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
228
|
-
|
229
|
-
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
230
|
-
|
231
|
-
fixture.c:36:34: note: expanded from macro 'ASSERT_ARR_EQ'
|
232
|
-
|
233
|
-
printf("Expected %i\n", exp); \
|
234
|
-
|
235
|
-
~~ ^~~
|
236
|
-
|
237
|
-
fixture.c:81:50: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
|
238
|
-
|
239
|
-
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
240
|
-
|
241
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
|
242
|
-
|
243
|
-
fixture.c:37:36: note: expanded from macro 'ASSERT_ARR_EQ'
|
244
|
-
|
245
|
-
printf("Submitted %i\n\n", sub); \
|
246
|
-
|
247
|
-
~~ ^~~
|
248
|
-
|
249
|
-
fixture.c:130:33: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
|
250
|
-
|
251
|
-
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
252
|
-
|
253
|
-
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
254
|
-
|
255
|
-
fixture.c:36:34: note: expanded from macro 'ASSERT_ARR_EQ'
|
256
|
-
|
257
|
-
printf("Expected %i\n", exp); \
|
258
|
-
|
259
|
-
~~ ^~~
|
260
|
-
|
261
|
-
fixture.c:130:54: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
|
262
|
-
|
263
|
-
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
264
|
-
|
265
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
|
266
|
-
|
267
|
-
fixture.c:37:36: note: expanded from macro 'ASSERT_ARR_EQ'
|
268
|
-
|
269
|
-
printf("Submitted %i\n\n", sub); \
|
270
|
-
|
271
|
-
~~ ^~~
|
272
|
-
|
273
|
-
fixture.c:123:23: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
|
274
|
-
|
275
|
-
for(int i=0; i<rand_len; i++) {
|
276
|
-
|
277
|
-
~^~~~~~~~~
|
278
|
-
|
279
|
-
15 warnings generated.
|
105
|
+
fixture.c:49:29: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
|
106
|
+
|
107
|
+
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
108
|
+
|
109
|
+
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
110
|
+
|
111
|
+
fixture.c:35:34: note: expanded from macro 'ASSERT_ARR_EQ'
|
112
|
+
|
113
|
+
printf("Expected %i\n", exp); \
|
114
|
+
|
115
|
+
~~ ^~~
|
116
|
+
|
117
|
+
fixture.c:49:50: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
|
118
|
+
|
119
|
+
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
120
|
+
|
121
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
|
122
|
+
|
123
|
+
fixture.c:36:36: note: expanded from macro 'ASSERT_ARR_EQ'
|
124
|
+
|
125
|
+
printf("Submitted %i\n\n", sub); \
|
126
|
+
|
127
|
+
~~ ^~~
|
128
|
+
|
129
|
+
fixture.c:59:29: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
|
130
|
+
|
131
|
+
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
132
|
+
|
133
|
+
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
134
|
+
|
135
|
+
fixture.c:35:34: note: expanded from macro 'ASSERT_ARR_EQ'
|
136
|
+
|
137
|
+
printf("Expected %i\n", exp); \
|
138
|
+
|
139
|
+
~~ ^~~
|
140
|
+
|
141
|
+
fixture.c:59:50: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
|
142
|
+
|
143
|
+
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
144
|
+
|
145
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
|
146
|
+
|
147
|
+
fixture.c:36:36: note: expanded from macro 'ASSERT_ARR_EQ'
|
148
|
+
|
149
|
+
printf("Submitted %i\n\n", sub); \
|
150
|
+
|
151
|
+
~~ ^~~
|
152
|
+
|
153
|
+
fixture.c:70:29: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
|
154
|
+
|
155
|
+
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
156
|
+
|
157
|
+
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
158
|
+
|
159
|
+
fixture.c:35:34: note: expanded from macro 'ASSERT_ARR_EQ'
|
160
|
+
|
161
|
+
printf("Expected %i\n", exp); \
|
162
|
+
|
163
|
+
~~ ^~~
|
164
|
+
|
165
|
+
fixture.c:70:50: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
|
166
|
+
|
167
|
+
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
168
|
+
|
169
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
|
170
|
+
|
171
|
+
fixture.c:36:36: note: expanded from macro 'ASSERT_ARR_EQ'
|
172
|
+
|
173
|
+
printf("Submitted %i\n\n", sub); \
|
174
|
+
|
175
|
+
~~ ^~~
|
176
|
+
|
177
|
+
fixture.c:80:29: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
|
178
|
+
|
179
|
+
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
180
|
+
|
181
|
+
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
182
|
+
|
183
|
+
fixture.c:35:34: note: expanded from macro 'ASSERT_ARR_EQ'
|
184
|
+
|
185
|
+
printf("Expected %i\n", exp); \
|
186
|
+
|
187
|
+
~~ ^~~
|
188
|
+
|
189
|
+
fixture.c:80:50: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
|
190
|
+
|
191
|
+
ASSERT_ARR_EQ(expected, exp_len, submission, sub_len);
|
192
|
+
|
193
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
|
194
|
+
|
195
|
+
fixture.c:36:36: note: expanded from macro 'ASSERT_ARR_EQ'
|
196
|
+
|
197
|
+
printf("Submitted %i\n\n", sub); \
|
198
|
+
|
199
|
+
~~ ^~~
|
200
|
+
|
201
|
+
8 warnings generated.
|
280
202
|
|
281
203
|
```
|