diff mbox

[1/4] xtab.c: Removed overflow in implicit constant conversion errors

Message ID 20180604145051.146390-2-steved@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve Dickson June 4, 2018, 2:50 p.m. UTC
xtab.c: In function 'xtab_read':
xtab.c:60:4: error: overflow in implicit constant conversion
[-Werror=overflow]
    exp->m_xtabent = 1;
    ^
xtab.c:61:4: error: overflow in implicit constant conversion
[-Werror=overflow]
    exp->m_mayexport = 1;

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 support/include/exportfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chuck Lever III June 4, 2018, 3:03 p.m. UTC | #1
> On Jun 4, 2018, at 10:50 AM, Steve Dickson <steved@redhat.com> wrote:
> 
> xtab.c: In function 'xtab_read':
> xtab.c:60:4: error: overflow in implicit constant conversion
> [-Werror=overflow]
>    exp->m_xtabent = 1;
>    ^
> xtab.c:61:4: error: overflow in implicit constant conversion
> [-Werror=overflow]
>    exp->m_mayexport = 1;
> 
> Signed-off-by: Steve Dickson <steved@redhat.com>
> ---
> support/include/exportfs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/support/include/exportfs.h b/support/include/exportfs.h
> index 8af47a8..a82a9b8 100644
> --- a/support/include/exportfs.h
> +++ b/support/include/exportfs.h
> @@ -97,7 +97,7 @@ typedef struct mexport {
> 	struct mclient *	m_client;
> 	struct exportent	m_export;
> 	int			m_exported;	/* known to knfsd. */
> -	int			m_xtabent  : 1,	/* xtab entry exists */
> +	unsigned int m_xtabent : 1,	/* xtab entry exists */

Nit: White space damage. "m_xtabent" and the colon should line up with the following fields.

Overall these look like all the errors I hit. Thanks for the fixes!


> 				m_mayexport: 1,	/* derived from xtabbed */
> 				m_changed  : 1, /* options (may) have changed */
> 				m_warned   : 1; /* warned about multiple exports
> -- 
> 1.8.3.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
Chuck Lever



--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/support/include/exportfs.h b/support/include/exportfs.h
index 8af47a8..a82a9b8 100644
--- a/support/include/exportfs.h
+++ b/support/include/exportfs.h
@@ -97,7 +97,7 @@  typedef struct mexport {
 	struct mclient *	m_client;
 	struct exportent	m_export;
 	int			m_exported;	/* known to knfsd. */
-	int			m_xtabent  : 1,	/* xtab entry exists */
+	unsigned int m_xtabent : 1,	/* xtab entry exists */
 				m_mayexport: 1,	/* derived from xtabbed */
 				m_changed  : 1, /* options (may) have changed */
 				m_warned   : 1; /* warned about multiple exports