Skip to content

Commit

Permalink
Fix Open XL compiler warnings
Browse files Browse the repository at this point in the history
Changes along with the diagnostic flags:
compiler/optimizer/ValuePropagationCommon.cpp [-Wsometimes-uninitialized]
include_core/unix/zos/edcwccwi.h [-Wtrigraphs]
util/a2e/atoe.c [-Wwritable-strings]
util/a2e/headers/stdio.h [-Wwritable-strings]

Signed-off-by: Gaurav Chaudhari <[email protected]>
  • Loading branch information
Deigue committed Aug 2, 2024
1 parent 21d60a7 commit 5617a37
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion compiler/optimizer/ValuePropagationCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3295,7 +3295,7 @@ void OMR::ValuePropagation::transformRealTimeArrayCopy(TR_RealTimeArrayCopy *rtA
//create ifNodes
TR::Node *spineShiftNode = TR::Node::create(vcallNode, TR::iconst, 0, (int32_t)fe()->getArraySpineShift(elementSize));
TR::TreeTop *ifTree;
TR::Node *ifNode;
TR::Node *ifNode = nullptr;
TR::Node *srcOff = NULL, *dstOff = NULL;
TR::Node *len = NULL;
TR::SymbolReference *child1Ref = NULL, *child2Ref = NULL;
Expand Down
16 changes: 8 additions & 8 deletions include_core/unix/zos/edcwccwi.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
* @ddr_namespace: default
*/

??=ifndef __edcwccwi
??=ifdef __COMPILER_VER__
??=pragma filetag("IBM-1047")
??=endif
#ifndef __edcwccwi
#ifdef __COMPILER_VER__
#pragma filetag("IBM-1047")
#endif
#define __edcwccwi 1
#pragma nomargins nosequence
#pragma checkout(suspend)
Expand Down Expand Up @@ -279,7 +279,7 @@ struct __jumpinfo_vr_ext
U_128 __ji_ve_savearea[32];
} __jumpinfo_vr_ext_t_;

#if ((!defined(_LP64) && defined(__XPLINK__)) || \
#if ((!defined(_LP64) && defined(__XPLINK__)) || \
(defined(_LP64) && (__EDC_TARGET >= __EDC_LE4107)))
typedef
struct __jumpinfo
Expand Down Expand Up @@ -360,7 +360,7 @@ __set_stack_softlimit

#endif /* __XPLINK__ */
#else
#define __set_stack_softlimit(a) \
#define __set_stack_softlimit(a) \
struct __no64bitSupport __set_stack_softlimit
#endif /* ! _LP64 */

Expand Down Expand Up @@ -580,7 +580,7 @@ struct __event1_s {

#endif
#else
#define __stack_info(a,b) \
#define __stack_info(a,b) \
struct __no64bitSupport __stack_info
#endif

Expand Down Expand Up @@ -610,4 +610,4 @@ struct __event1_s {
#endif

#pragma checkout(resume)
??=endif /* __edcwccwi */
#endif /* __edcwccwi */
4 changes: 2 additions & 2 deletions util/a2e/atoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ std_sprintf(const char *buf, char *ascii_chars, ...)
* returns -
*************************************************************************/
int
atoe_sprintf(char *buf, char *ascii_chars, ...)
atoe_sprintf(char *buf, const char *ascii_chars, ...)
{
int len;
char wrkbuf[BUFLEN];
Expand Down Expand Up @@ -1370,7 +1370,7 @@ atoe_sprintf(char *buf, char *ascii_chars, ...)
* returns -
*************************************************************************/
int
atoe_snprintf(char *buf, size_t buflen, char *ascii_chars, ...)
atoe_snprintf(char *buf, size_t buflen, const char *ascii_chars, ...)
{
int len;

Expand Down
4 changes: 2 additions & 2 deletions util/a2e/headers/stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
int atoe_printf (const char*, ...);
int atoe_putchar (int);
int atoe_rename (const char*, const char*);
int atoe_sprintf (char*, char*, ...);
int atoe_snprintf (char *buf, size_t buflen, char *ascii_chars, ...);
int atoe_sprintf (char*, const char*, ...);
int atoe_snprintf (char *buf, size_t buflen, const char *ascii_chars, ...);
int std_sprintf (const char*, char*, ...);
int atoe_sscanf (const char*, const char*, ...); /*ibm@2609*/
char * atoe_tempnam (const char *, char *);
Expand Down

0 comments on commit 5617a37

Please sign in to comment.