[issue45713] gcc warning when compiling Modules/expat/xmltok_ns.c

2022-02-08 Thread Cyril Jouve


Change by Cyril Jouve :


--
keywords: +patch
nosy: +Cyril Jouve
nosy_count: 2.0 -> 3.0
pull_requests: +29393
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31022

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45713] gcc warning when compiling Modules/expat/xmltok_ns.c

2022-01-16 Thread sping


sping  added the comment:

This has been fixed upstream in pull request 
https://github.com/libexpat/libexpat/pull/527 that is included with latest 
release libexpat 2.4.3.  bpo-46400 will fix this as a side effect.

--
nosy: +sping

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45713] gcc warning when compiling Modules/expat/xmltok_ns.c

2021-11-04 Thread vamsi kalapala


New submission from vamsi kalapala :

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, , end, , 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];
}

--
messages: 405717
nosy: vamsi1281977
priority: normal
severity: normal
status: open
title: gcc warning when compiling Modules/expat/xmltok_ns.c
type: compile error
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com