Project

General

Profile

Actions

Bug #18076

closed

ext/digest/md5/md5.c: `-Wnull-pointer-subtraction` warning by Clang 13

Added by xtkoba (Tee KOBAYASHI) over 2 years ago. Updated over 2 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.0dev (2021-08-16T00:07:09Z master 4cc44bd819) [x86_64-linux]
[ruby-core:104925]

Description

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.
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0