This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vamsi1281977
Recipients vamsi1281977
Date 2021-11-04.13:38:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1636033117.93.0.543536023335.issue45713@roundup.psfhosted.org>
In-reply-to
Content
The code that triggers the compiler warning is:

NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end) {
#  define ENCODING_MAX 128
  char buf[ENCODING_MAX];  /// <==== THIS GIVES A WARNING.
  // THE FIX IS ====> char buf[ENCODING_MAX] = "";
  char *p = buf;
  int i;
  XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
  if (ptr != end)
    return 0;
  *p = 0;
  if (streqci(buf, KW_UTF_16) && enc->minBytesPerChar == 2)
    return enc;
  i = getEncodingIndex(buf);
  if (i == UNKNOWN_ENC)
    return 0;
  return NS(encodings)[i];
}
History
Date User Action Args
2021-11-04 13:38:37vamsi1281977setrecipients: + vamsi1281977
2021-11-04 13:38:37vamsi1281977setmessageid: <1636033117.93.0.543536023335.issue45713@roundup.psfhosted.org>
2021-11-04 13:38:37vamsi1281977linkissue45713 messages
2021-11-04 13:38:37vamsi1281977create