public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: src/
Date: Wed,  2 Aug 2023 15:50:15 +0000 (UTC)	[thread overview]
Message-ID: <1690989961.8cc2348a2c0706f57962fee09a91c5a5b85f1b99.floppym@gentoo> (raw)

commit:     8cc2348a2c0706f57962fee09a91c5a5b85f1b99
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  2 15:21:26 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Aug  2 15:26:01 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=8cc2348a

_reflink_linux_file_copy: initialize error to 0

Avoids a compiler warning:
```
../src/portage_util_file_copy_reflink_linux.c: In function ‘_reflink_linux_file_copy’:
../src/portage_util_file_copy_reflink_linux.c:379:12: warning: ‘error’ may be used uninitialized [-Wmaybe-uninitialized]
  379 |         if (!error && ftruncate(fd_out, offset_out) < 0)
      |            ^
../src/portage_util_file_copy_reflink_linux.c:205:22: note: ‘error’ was declared here
  205 |     int eintr_retry, error, fd_in, fd_out, stat_in_acquired, stat_out_acquired;
      |                      ^~~~~
```

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 src/portage_util_file_copy_reflink_linux.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/portage_util_file_copy_reflink_linux.c b/src/portage_util_file_copy_reflink_linux.c
index 74ba4a010..e98db3db8 100644
--- a/src/portage_util_file_copy_reflink_linux.c
+++ b/src/portage_util_file_copy_reflink_linux.c
@@ -214,6 +214,7 @@ _reflink_linux_file_copy(PyObject *self, PyObject *args)
         return NULL;
 
     eintr_retry = 1;
+    error = 0;
     offset_out = 0;
     stat_in_acquired = 0;
     stat_out_acquired = 0;


             reply	other threads:[~2023-08-02 15:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02 15:50 Mike Gilbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-06-28 18:16 [gentoo-commits] proj/portage:master commit in: src/ Zac Medico
2023-06-07  7:29 Sam James
2021-12-12  1:14 Zac Medico
2020-12-25  0:28 Mike Gilbert
2017-12-16  0:38 Zac Medico
2017-12-15 21:17 Zac Medico
2017-10-27 18:50 Zac Medico
2017-05-14 18:08 Zac Medico

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-all from there: mbox

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

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

  git send-email \
    --in-reply-to=1690989961.8cc2348a2c0706f57962fee09a91c5a5b85f1b99.floppym@gentoo \
    --to=floppym@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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