diff --git a/libasn1compiler/asn1c_compat.c b/libasn1compiler/asn1c_compat.c
index 3d8280a032d94f23951baa40d374aff438e9f8e4..44ba3e60d4fb148de04e4fbd016af62a0e711fef 100644
--- a/libasn1compiler/asn1c_compat.c
+++ b/libasn1compiler/asn1c_compat.c
@@ -54,7 +54,6 @@ a1c_dirname(const char *path) {
 
 	/* One-pass determination of the last char of the pathname */
 	for(pend = path; ; pend++) {
-		printf("-%c", *pend);
 		switch(*pend) {
 		case '\0': break;
 		case '/':
@@ -69,7 +68,6 @@ a1c_dirname(const char *path) {
 		}
 		break;
 	}
-	printf("\n");
 
 	if(last <= path) {
 		strcpy(strbuf, *path == '/' ? "/" : ".");