Thread (1 message) 1 message, 1 author, 2013-02-22

Re: [PATCH] libibumad: add string functions for various enums

From: Jason Gunthorpe <hidden>
Date: 2013-02-22 20:23:14

On Fri, Feb 22, 2013 at 01:27:10PM -0500, Hal Rosenstock wrote:
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? Is -Wall turned on? The return
type should be 'const char *' when returning strings from rodata.

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help