ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "jeremyevans0 (Jeremy Evans)" <noreply@ruby-lang.org>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:105631] [Ruby master Bug#18076] ext/digest/md5/md5.c: `-Wnull-pointer-subtraction` warning by Clang 13
Date: Wed, 13 Oct 2021 15:42:52 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-94121.20211013154251.48178@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-18076.20210816084246.48178@ruby-lang.org

Issue #18076 has been updated by jeremyevans0 (Jeremy Evans).


I submitted a pull request upstream to fix this: https://github.com/ruby/digest/pull/29

----------------------------------------
Bug #18076: ext/digest/md5/md5.c: `-Wnull-pointer-subtraction` warning by Clang 13
https://bugs.ruby-lang.org/issues/18076#change-94121

* 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/

      parent reply	other threads:[~2021-10-13 15:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16  8:43 [ruby-core:104925] [Ruby master Bug#18076] ext/digest/md5/md5.c: `-Wnull-pointer-subtraction` warning by Clang 13 xtkoba (Tee KOBAYASHI)
2021-08-17 17:39 ` [ruby-core:104957] " xtkoba (Tee KOBAYASHI)
2021-10-13 15:42 ` jeremyevans0 (Jeremy Evans) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-94121.20211013154251.48178@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).