Skip to content

Commit 18a324a

Browse files
kaadambryanpkc
authored andcommitted
win: Fix type mismatch char* vs const char*
1 parent de99419 commit 18a324a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

runtime/flang/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const char *__fort_transnam = "rpm1";
2222

2323
/* pg access routines for data shared between windows dlls */
2424

25-
char *
25+
const char *
2626
__get_fort_transnam(void)
2727
{
2828
return __fort_transnam;

tools/flang2/flang2exe/iliutil.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ gnr_math(const char *root, int widthc, int typec, const char *oldname, int maske
933933
* oldname - old 'mth' name (only if scalar)
934934
*/
935935
#if defined(TARGET_OSX) || defined(TARGET_WIN)
936-
return oldname;
936+
sprintf(bf, "%s", oldname);
937937
#else
938938
if (widthc == 's' || widthc == 'v')
939939
sprintf(bf, "__g%c%c_%s", widthc, typec, root);
@@ -942,8 +942,8 @@ gnr_math(const char *root, int widthc, int typec, const char *oldname, int maske
942942
mk = !masked ? "" : "_mask";
943943
sprintf(bf, "__g%c%c_%s%d%s", 'v', typec, root, widthc, mk);
944944
}
945-
return bf;
946945
#endif
946+
return bf;
947947
}
948948

949949
static char *

0 commit comments

Comments
 (0)