Index: kernel/generic/src/console/kconsole.c
===================================================================
--- kernel/generic/src/console/kconsole.c	(revision 847844a5c1c6014e479cb00bf10c9d740927aa2d)
+++ kernel/generic/src/console/kconsole.c	(revision c81d4f18721cc59f484518c5e3819a401e3e431f)
@@ -564,16 +564,16 @@
 		uintptr_t symaddr;
 		errno_t rc = symtab_addr_lookup(symname, &symaddr);
-		switch ((case_errno_t) rc) {
-		case (case_errno_t) ENOENT:
+		switch (rc) {
+		case ENOENT:
 			printf("Symbol %s not found.\n", symname);
 			return false;
-		case (case_errno_t) EOVERFLOW:
+		case EOVERFLOW:
 			printf("Duplicate symbol %s.\n", symname);
 			symtab_print_search(symname);
 			return false;
-		case (case_errno_t) ENOTSUP:
+		case ENOTSUP:
 			printf("No symbol information available.\n");
 			return false;
-		case (case_errno_t) EOK:
+		case EOK:
 			if (isaddr)
 				*result = (sysarg_t) symaddr;
@@ -594,12 +594,12 @@
 		if (end != text + len)
 			rc = EINVAL;
-		switch ((case_errno_t) rc) {
-		case (case_errno_t) EINVAL:
+		switch (rc) {
+		case EINVAL:
 			printf("Invalid number '%s'.\n", text);
 			return false;
-		case (case_errno_t) EOVERFLOW:
+		case EOVERFLOW:
 			printf("Integer overflow in '%s'.\n", text);
 			return false;
-		case (case_errno_t) EOK:
+		case EOK:
 			*result = (sysarg_t) value;
 			if (isptr)
Index: kernel/generic/src/debug/symtab.c
===================================================================
--- kernel/generic/src/debug/symtab.c	(revision 847844a5c1c6014e479cb00bf10c9d740927aa2d)
+++ kernel/generic/src/debug/symtab.c	(revision c81d4f18721cc59f484518c5e3819a401e3e431f)
@@ -98,8 +98,8 @@
 	errno_t rc = symtab_name_lookup(addr, &name, NULL);
 	
-	switch ((case_errno_t) rc) {
-	case (case_errno_t) EOK:
+	switch (rc) {
+	case EOK:
 		return name;
-	case (case_errno_t) ENOENT:
+	case ENOENT:
 		return "unknown";
 	default:
Index: uspace/app/bdsh/cmds/builtins/cd/cd.c
===================================================================
--- uspace/app/bdsh/cmds/builtins/cd/cd.c	(revision 847844a5c1c6014e479cb00bf10c9d740927aa2d)
+++ uspace/app/bdsh/cmds/builtins/cd/cd.c	(revision c81d4f18721cc59f484518c5e3819a401e3e431f)
@@ -145,9 +145,9 @@
 		return CMD_SUCCESS;
 	} else {
-		switch ((case_errno_t) rc) {
-		case (case_errno_t) ENOMEM:
+		switch (rc) {
+		case ENOMEM:
 			cli_error(CL_EFAIL, "Destination path too long");
 			break;
-		case (case_errno_t) ENOENT:
+		case ENOENT:
 			cli_error(CL_ENOENT, "Invalid directory `%s'", target_directory);
 			break;
Index: uspace/app/edit/edit.c
===================================================================
--- uspace/app/edit/edit.c	(revision 847844a5c1c6014e479cb00bf10c9d740927aa2d)
+++ uspace/app/edit/edit.c	(revision c81d4f18721cc59f484518c5e3819a401e3e431f)
@@ -589,9 +589,9 @@
 	rc = file_save_range(fname, &sp, &ep);
 
-	switch ((case_errno_t) rc) {
-	case (case_errno_t) EINVAL:
+	switch (rc) {
+	case EINVAL:
 		status_display("Error opening file!");
 		break;
-	case (case_errno_t) EIO:
+	case EIO:
 		status_display("Error writing data!");
 		break;
Index: uspace/app/init/init.c
===================================================================
--- uspace/app/init/init.c	(revision 847844a5c1c6014e479cb00bf10c9d740927aa2d)
+++ uspace/app/init/init.c	(revision c81d4f18721cc59f484518c5e3819a401e3e431f)
@@ -81,6 +81,6 @@
     const char *fstype, const char *dev, errno_t rc)
 {
-	switch ((case_errno_t) rc) {
-	case (case_errno_t) EOK:
+	switch (rc) {
+	case EOK:
 		if (dev != NULL)
 			printf("%s: %s mounted on %s (%s at %s)\n", NAME, desc, mntpt,
@@ -89,11 +89,11 @@
 			printf("%s: %s mounted on %s (%s)\n", NAME, desc, mntpt, fstype);
 		break;
-	case (case_errno_t) EBUSY:
+	case EBUSY:
 		printf("%s: %s already mounted on %s\n", NAME, desc, mntpt);
 		return false;
-	case (case_errno_t) ELIMIT:
+	case ELIMIT:
 		printf("%s: %s limit exceeded\n", NAME, desc);
 		return false;
-	case (case_errno_t) ENOENT:
+	case ENOENT:
 		printf("%s: %s unknown type (%s)\n", NAME, desc, fstype);
 		return false;
Index: uspace/app/tester/hw/serial/serial1.c
===================================================================
--- uspace/app/tester/hw/serial/serial1.c	(revision 847844a5c1c6014e479cb00bf10c9d740927aa2d)
+++ uspace/app/tester/hw/serial/serial1.c	(revision c81d4f18721cc59f484518c5e3819a401e3e431f)
@@ -63,10 +63,10 @@
 		cnt = DEFAULT_COUNT;
 	else
-		switch ((case_errno_t) str_size_t(test_argv[0], NULL, 0, true, &cnt)) {
-		case (case_errno_t) EOK:
+		switch (str_size_t(test_argv[0], NULL, 0, true, &cnt)) {
+		case EOK:
 			break;
-		case (case_errno_t) EINVAL:
+		case EINVAL:
 			return "Invalid argument, unsigned integer expected";
-		case (case_errno_t) EOVERFLOW:
+		case EOVERFLOW:
 			return "Argument size overflow";
 		default:
Index: uspace/dist/src/c/demos/edit/edit.c
===================================================================
--- uspace/dist/src/c/demos/edit/edit.c	(revision 847844a5c1c6014e479cb00bf10c9d740927aa2d)
+++ uspace/dist/src/c/demos/edit/edit.c	(revision c81d4f18721cc59f484518c5e3819a401e3e431f)
@@ -588,9 +588,9 @@
 	rc = file_save_range(fname, &sp, &ep);
 
-	switch ((case_errno_t) rc) {
-	case (case_errno_t) EINVAL:
+	switch (rc) {
+	case EINVAL:
 		status_display("Error opening file!");
 		break;
-	case (case_errno_t) EIO:
+	case EIO:
 		status_display("Error writing data!");
 		break;
Index: uspace/lib/c/generic/elf/elf_load.c
===================================================================
--- uspace/lib/c/generic/elf/elf_load.c	(revision 847844a5c1c6014e479cb00bf10c9d740927aa2d)
+++ uspace/lib/c/generic/elf/elf_load.c	(revision c81d4f18721cc59f484518c5e3819a401e3e431f)
@@ -80,9 +80,9 @@
 
 	errno_t rc2 = rtld_prog_process(&info->finfo, &env);
-	switch ((case_errno_t) rc2) {
-	case (case_errno_t) EOK:
+	switch (rc2) {
+	case EOK:
 		rc = EE_OK;
 		break;
-	case (case_errno_t) ENOMEM:
+	case ENOMEM:
 		rc = EE_MEMORY;
 		break;
Index: uspace/lib/c/generic/inet/host.c
===================================================================
--- uspace/lib/c/generic/inet/host.c	(revision 847844a5c1c6014e479cb00bf10c9d740927aa2d)
+++ uspace/lib/c/generic/inet/host.c	(revision c81d4f18721cc59f484518c5e3819a401e3e431f)
@@ -210,10 +210,10 @@
 	rc = inet_host_parse(str, &host, endptr != NULL ? &eptr : NULL);
 	if (rc != EOK) {
-		switch ((case_errno_t) rc) {
-		case (case_errno_t) EINVAL:
+		switch (rc) {
+		case EINVAL:
 			if (errmsg != NULL)
 				*errmsg = "Invalid format";
 			goto error;
-		case (case_errno_t) ENOMEM:
+		case ENOMEM:
 			if (errmsg != NULL)
 				*errmsg = "Out of memory";
Index: uspace/lib/c/generic/inet/hostport.c
===================================================================
--- uspace/lib/c/generic/inet/hostport.c	(revision 847844a5c1c6014e479cb00bf10c9d740927aa2d)
+++ uspace/lib/c/generic/inet/hostport.c	(revision c81d4f18721cc59f484518c5e3819a401e3e431f)
@@ -264,14 +264,14 @@
 	rc = inet_hostport_parse(str, &hp, endptr != NULL ? &eptr : NULL);
 	if (rc != EOK) {
-		switch ((case_errno_t) rc) {
-		case (case_errno_t) EINVAL:
+		switch (rc) {
+		case EINVAL:
 			if (errmsg != NULL)
 				*errmsg = "Invalid format";
 			goto error;
-		case (case_errno_t) ENOMEM:
+		case ENOMEM:
 			if (errmsg != NULL)
 				*errmsg = "Out of memory";
 			goto error;
-		case (case_errno_t) EOK:
+		case EOK:
 			break;
 		default:
Index: uspace/lib/c/generic/str_error.c
===================================================================
--- uspace/lib/c/generic/str_error.c	(revision 847844a5c1c6014e479cb00bf10c9d740927aa2d)
+++ uspace/lib/c/generic/str_error.c	(revision c81d4f18721cc59f484518c5e3819a401e3e431f)
@@ -96,5 +96,5 @@
 	}
 
-	snprintf(noerr, NOERR_LEN, "(%d)", (int)(case_errno_t) e);
+	snprintf(noerr, NOERR_LEN, "(%d)", (int)e);
 	return noerr;
 }
@@ -108,5 +108,5 @@
 	}
 
-	snprintf(noerr, NOERR_LEN, "Unknown error code (%d)", (int)(case_errno_t) e);
+	snprintf(noerr, NOERR_LEN, "Unknown error code (%d)", (int)e);
 	return noerr;
 }
Index: uspace/lib/c/include/stdlib.h
===================================================================
--- uspace/lib/c/include/stdlib.h	(revision 847844a5c1c6014e479cb00bf10c9d740927aa2d)
+++ uspace/lib/c/include/stdlib.h	(revision c81d4f18721cc59f484518c5e3819a401e3e431f)
@@ -56,5 +56,5 @@
 #include <errno.h>
 static inline int EXIT_RC(errno_t rc) {
-	return (int) (case_errno_t) rc;
+	return (int) rc;
 }
 
Index: uspace/srv/devman/driver.c
===================================================================
--- uspace/srv/devman/driver.c	(revision 847844a5c1c6014e479cb00bf10c9d740927aa2d)
+++ uspace/srv/devman/driver.c	(revision c81d4f18721cc59f484518c5e3819a401e3e431f)
@@ -603,9 +603,9 @@
 	}
 
-	switch ((case_errno_t) rc) {
-	case (case_errno_t) EOK:
+	switch (rc) {
+	case EOK:
 		dev->state = DEVICE_USABLE;
 		break;
-	case (case_errno_t) ENOENT:
+	case ENOENT:
 		dev->state = DEVICE_NOT_PRESENT;
 		break;
