Skip to content

Commit 50907c0

Browse files
authored
Merge pull request #181 from AMD-Lightning-Internal/amd/dev/juamarti/comgr-fix-test-warnings
[Comgr][Test] Fix warnings in comgr tests
2 parents a8b41c5 + e89557a commit 50907c0

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

amd/comgr/test/common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,10 @@ size_t WriteFile(int FD, const char *Buffer, size_t Size) {
332332

333333
while (BytesWritten < Size) {
334334
#if defined(_WIN32) || defined(_WIN64)
335-
size_t Ret =
335+
ssize_t Ret =
336336
_write(FD, Buffer + BytesWritten, (unsigned int)(Size - BytesWritten));
337337
#else
338-
size_t Ret = write(FD, Buffer + BytesWritten, Size - BytesWritten);
338+
ssize_t Ret = write(FD, Buffer + BytesWritten, Size - BytesWritten);
339339
#endif
340340
if (Ret == 0) {
341341
break;

amd/comgr/test/fail_to_build_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
int main(int argc, char *argv[]) {
4343
char *BufSource1;
44-
size_t SizeSource1, SizeSource2, SizeInclude;
44+
size_t SizeSource1;
4545
amd_comgr_data_t DataSource1, DataSource2, DataInclude;
4646
amd_comgr_data_set_t DataSetIn, DataSetBc;
4747
amd_comgr_action_info_t DataAction;

amd/comgr/test/mangled_names_hip_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int main(int argc, char *argv[]) {
4444
size_t SizeSource;
4545
amd_comgr_data_t DataSource;
4646
amd_comgr_data_set_t DataSetIn, DataSetBc, DataSetLinked, DataSetReloc,
47-
DataSetExec, DataSetReloc2, DataSetExec2;
47+
DataSetExec;
4848
amd_comgr_action_info_t DataAction;
4949
amd_comgr_status_t Status;
5050
size_t Count;

amd/comgr/test/unbundle_hip_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ int main(int Argc, char *Argv[]) {
135135
size_t BundleEntryIDsCount =
136136
sizeof(BundleEntryIDs) / sizeof(BundleEntryIDs[0]);
137137
Status = amd_comgr_action_info_set_bundle_entry_ids(ActionInfoUnbundle,
138-
BundleEntryIDs, 2);
138+
BundleEntryIDs, BundleEntryIDsCount);
139139

140140
// Unbundle
141141
Status = amd_comgr_create_data_set(&DataSetUnbundled);
@@ -354,7 +354,7 @@ int main(int Argc, char *Argv[]) {
354354
&BundleCount);
355355
checkError(Status, "amd_comgr_action_info_get_bundle_entry_id_count");
356356

357-
for (int I = 0; I < BundleCount; I++) {
357+
for (size_t I = 0; I < BundleCount; I++) {
358358

359359
size_t Size;
360360
Status = amd_comgr_action_info_get_bundle_entry_id(ActionInfoUnbundle, I,

0 commit comments

Comments
 (0)