[clinfo] 53/148: Flush stdout/err at strategic places

Andreas Beckmann anbe at moszumanska.debian.org
Mon Nov 17 14:09:45 UTC 2014


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch clinfo
in repository clinfo.

commit b65fef3af297810ba95b3ad91e99937bf282406c
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date:   Thu Jul 31 21:50:22 2014 +0200

    Flush stdout/err at strategic places
---
 src/clinfo.c | 2 ++
 src/error.h  | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/src/clinfo.c b/src/clinfo.c
index 2f59eb6..18bf1a0 100644
--- a/src/clinfo.c
+++ b/src/clinfo.c
@@ -725,6 +725,8 @@ int main(void)
 			printDeviceInfo(d);
 			if (d < num_devs[p] - 1)
 				puts("");
+			fflush(stdout);
+			fflush(stderr);
 		}
 		if (p < num_platforms - 1)
 			puts("");
diff --git a/src/error.h b/src/error.h
index f70baf4..28a72c5 100644
--- a/src/error.h
+++ b/src/error.h
@@ -8,8 +8,11 @@ int
 check_ocl_error(cl_int err, const char *what, const char *func, int line)
 {
 	if (err != CL_SUCCESS) {
+		fflush(stdout);
+		fflush(stderr);
 		fprintf(stderr, "%s:%u: %s : error %d\n",
 			func, line, what, err);
+		fflush(stderr);
 	}
 	return err != CL_SUCCESS;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/clinfo.git



More information about the Pkg-opencl-commits mailing list