Details
Both gcc and clang (on Mac) warn for pointer-incompatible
assignments. It appears that gcc's -Wwarn-strings isn't working
properly, because it produces no warnings for the following
assignment:
char *potentialSegV = ".rodata-based string";
However, clang does.
This change addresses three problems in bora/lib that produce build
failures when -Wincompatible-pointer-types-discards-qualifiers is
enabled when using clang (one wonders how many other such potential
problems exist?)
o bsd_vsnprintf.c
The 'cp' pointer is assigned the address of a constant string.
Since there are writes through 'cp', the quickest solution is to
declare a local, non-const, array variable that holds the string
"(null)".
o unicodeSimpleTypes.c
This change, the easiest of the three, marks the 'char *' field as
'const'.
* determine if a build is set to expire or not.
*/
#ifdef HARD_EXPIRE
- static char *hard_expire = "Expire";
+ static char hard_expire[] = "Expire";
(void)hard_expire;
ASSERT(e);
e->daysLeft = TimeUtil_DaysLeft(&e->when);
#else
- static char *hard_expire = "No Expire";
+ static char hard_expire[] = "No Expire";
(void) hard_expire;
ASSERT(e);
/*********************************************************
- * Copyright (C) 2007-2017 VMware, Inc. All rights reserved.
+ * Copyright (C) 2007-2018 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
StringEncoding encoding; // ICU encoding enum
Bool isSupported; // VMware supported encoding
int preferredMime; // Index of preferred MIME name
- char *names[MAXCHARSETNAMES]; // Encoding name and aliases
+ const char *names[MAXCHARSETNAMES]; // Encoding name and aliases
} xRef[] = {
/*
* Source: ECMA registry