[ruby-core:104925] [Ruby master Bug#18076] ext/digest/md5/md5.c: `-Wnull-pointer-subtraction` warning by Clang 13
From:
"xtkoba (Tee KOBAYASHI)" <noreply@...>
Date:
2021-08-16 08:43:00 UTC
List:
ruby-core #104925
Issue #18076 has been reported by xtkoba (Tee KOBAYASHI).
----------------------------------------
Bug #18076: ext/digest/md5/md5.c: `-Wnull-pointer-subtraction` warning by Clang 13
https://bugs.ruby-lang.org/issues/18076
* Author: xtkoba (Tee KOBAYASHI)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.0dev (2021-08-16T00:07:09Z master 4cc44bd819) [x86_64-linux]
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
```
compiling ../../../../ext/digest/md5/md5.c
../../../../ext/digest/md5/md5.c:228:17: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]
if (!((data - (const uint8_t *)0) & 3)) {
^ ~~~~~~~~~~~~~~~~~~
1 warning generated.
```
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>