Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1639201

Re: [PATCH] FS: Fixing return type of unsigned_offsets

From Al Viro <viro@ZenIV.linux.org.uk>
Newsgroups linux.kernel
Subject Re: [PATCH] FS: Fixing return type of unsigned_offsets
Date 2017-05-11 08:10 +0200
Message-ID <tFPst-2B9-1@gated-at.bofh.it> (permalink)
References <tFNTH-1w1-1@gated-at.bofh.it> <tFOd4-1Ci-7@gated-at.bofh.it> <tFOd4-1Ci-5@gated-at.bofh.it> <tFOmJ-1Gx-7@gated-at.bofh.it> <tFOwp-22k-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, May 11, 2017 at 10:34:02AM +0530, Pushkar Jambhlekar wrote:
> If I remove '!!', sparse flags warning:
> 
> fs/read_write.c:38:29: warning: incorrect type in return expression
> (different base types)
> fs/read_write.c:38:29:    expected bool
> fs/read_write.c:38:29:    got restricted fmode_t
> 
> It means explicit conversion is needed.

FVO"needed" equal to "needed to make sparse STFU"?  If anything, that's
sparse being wrong - evaluate.c:check_assignment_type() should do
		if (t == &ctype_bool) {
			if (is_fouled_type(s))
				warning((*rp)->pos, "%s degrades to integer",
					show_typename(s->ctype.base_type));
			goto Cast;
                }
right after
                } else if (!(sclass & TYPE_RESTRICT))
                        goto Cast;

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] FS: Fixing return type of unsigned_offsets Pushkar Jambhlekar <pushkar.iit@gmail.com> - 2017-05-11 06:30 +0200
  Re: [PATCH] FS: Fixing return type of unsigned_offsets Pushkar Jambhlekar <pushkar.iit@gmail.com> - 2017-05-11 06:50 +0200
    Re: [PATCH] FS: Fixing return type of unsigned_offsets Joe Perches <joe@perches.com> - 2017-05-11 07:00 +0200
      Re: [PATCH] FS: Fixing return type of unsigned_offsets Pushkar Jambhlekar <pushkar.iit@gmail.com> - 2017-05-11 07:10 +0200
        Re: [PATCH] FS: Fixing return type of unsigned_offsets Al Viro <viro@ZenIV.linux.org.uk> - 2017-05-11 08:10 +0200
          Re: [PATCH] FS: Fixing return type of unsigned_offsets Luc Van Oostenryck <luc.vanoostenryck@gmail.com> - 2017-05-11 22:10 +0200
  Re: [PATCH] FS: Fixing return type of unsigned_offsets Joe Perches <joe@perches.com> - 2017-05-11 06:50 +0200

csiph-web