Skip to content

Commit f8c2c2f

Browse files
authored
[Comgr] Switch type to const char to fix warning
char * can be safely cast to const char *, so this should not cause any breakages for API users. The const designation more accurately describes this argument, and fixes warnings with the tests, which now use const char * arguments
1 parent 5976512 commit f8c2c2f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

amd/comgr/include/amd_comgr.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2525,7 +2525,7 @@ amd_comgr_status_t AMD_COMGR_API
25252525
amd_comgr_map_name_expression_to_symbol_name(
25262526
amd_comgr_data_t data,
25272527
size_t *size,
2528-
char *name_expression,
2528+
const char *name_expression,
25292529
char *symbol_name) AMD_COMGR_VERSION_2_6;
25302530

25312531
/**

amd/comgr/src/comgr.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2152,7 +2152,8 @@ amd_comgr_populate_name_expression_map(amd_comgr_data_t Data, size_t *Count) {
21522152
amd_comgr_status_t AMD_COMGR_API
21532153
// NOLINTNEXTLINE(readability-identifier-naming)
21542154
amd_comgr_map_name_expression_to_symbol_name(amd_comgr_data_t Data,
2155-
size_t *Size, char *NameExpression,
2155+
size_t *Size,
2156+
const char *NameExpression,
21562157
char *SymbolName) {
21572158
DataObject *DataP = DataObject::convert(Data);
21582159
if (!DataP || !DataP->Data ||

0 commit comments

Comments
 (0)