Re: [PATCH] libibumad: add string functions for various enums
From: Ira Weiny <hidden>
Date: 2013-02-22 21:11:02
On Fri, 22 Feb 2013 14:01:17 -0700 Jason Gunthorpe [off-list ref] wrote:
On Fri, Feb 22, 2013 at 03:56:21PM -0500, Hal Rosenstock wrote:quoted
quoted
quoted
quoted
+char * umad_class_str(uint8_t mgmt_class) +{ + switch (mgmt_class) { + case UMAD_CLASS_SUBN_LID_ROUTED: + case UMAD_CLASS_SUBN_DIRECTED_ROUTE: + return("Subn");Doesn't this create a compiler warning?Not with my setup.quoted
Is -Wall turned on?Yes but maybe it depends on gcc version.Looks like gcc needs -Wwrite-strings to get constness warnings for strings. I strongly recommend getting constness correct for library entry points. It is a huge PITA to use const broken libraries from code that is const correct.
You are correct. Added in V<whatever we are on now>... :-( Ira
Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
-- Ira Weiny Member of Technical Staff Lawrence Livermore National Lab 925-423-8008 weiny2-i2BcT+NCU+M@public.gmane.org -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html