summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2014-04-11 20:10:32 +0000
committerMarcus Meissner <marcus@jet.franken.de>2014-04-11 20:10:32 +0000
commitc1ddde0315005e55ef361720b8b758fa163b1731 (patch)
treeef0d7fdd0ebcc010cd1c50e697eb01ddb86f2421 /examples
parent9e777504d448e26ace9a56f509a13a1f8fbbcf55 (diff)
downloadlibgphoto2-c1ddde0315005e55ef361720b8b758fa163b1731.tar.gz
From: "Daniel P. Berrange" <berrange@redhat.com>
A great many functions have variables which are set to some value, but never read thereafter. All these variables can be removed with no functional impact. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14896 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'examples')
-rw-r--r--examples/lunkwill-canon-capture.c8
-rw-r--r--examples/preview.c4
-rw-r--r--examples/sample-trigger-capture.c2
3 files changed, 9 insertions, 5 deletions
diff --git a/examples/lunkwill-canon-capture.c b/examples/lunkwill-canon-capture.c
index b64c2b1fc..b16739d96 100644
--- a/examples/lunkwill-canon-capture.c
+++ b/examples/lunkwill-canon-capture.c
@@ -129,7 +129,7 @@ main(int argc, char **argv) {
int retval;
GPContext *canoncontext = sample_create_context();
- gp_log_add_func(GP_LOG_ERROR, errordumper, NULL);
+ gp_log_add_func(GP_LOG_DEBUG, errordumper, NULL);
gp_camera_new(&canon);
/* When I set GP_LOG_DEBUG instead of GP_LOG_ERROR above, I noticed that the
@@ -146,6 +146,12 @@ main(int argc, char **argv) {
canon_enable_capture(canon, TRUE, canoncontext);
/*set_capturetarget(canon, canoncontext);*/
capture_to_file(canon, canoncontext, "foo.jpg");
+ capture_to_file(canon, canoncontext, "foo1.jpg");
+ capture_to_file(canon, canoncontext, "foo2.jpg");
+ capture_to_file(canon, canoncontext, "foo3.jpg");
+ capture_to_file(canon, canoncontext, "foo4.jpg");
+ capture_to_file(canon, canoncontext, "foo5.jpg");
+ capture_to_file(canon, canoncontext, "foo6.jpg");
gp_camera_exit(canon, canoncontext);
return 0;
}
diff --git a/examples/preview.c b/examples/preview.c
index 8a6cd118a..fb53d0804 100644
--- a/examples/preview.c
+++ b/examples/preview.c
@@ -24,7 +24,7 @@
static void errordumper(GPLogLevel level, const char *domain, const char *str,
void *data) {
- printf("%s\n", str);
+ printf("%s (data %p)\n", str,data);
}
/* This seems to have no effect on where images go
@@ -121,7 +121,7 @@ main(int argc, char **argv) {
int i, retval;
GPContext *canoncontext = sample_create_context();
- gp_log_add_func(GP_LOG_ERROR, errordumper, NULL);
+ gp_log_add_func(GP_LOG_ERROR, errordumper, 0x4242424242);
gp_camera_new(&canon);
/* When I set GP_LOG_DEBUG instead of GP_LOG_ERROR above, I noticed that the
diff --git a/examples/sample-trigger-capture.c b/examples/sample-trigger-capture.c
index 974f78460..0d8189ae4 100644
--- a/examples/sample-trigger-capture.c
+++ b/examples/sample-trigger-capture.c
@@ -128,7 +128,6 @@ int
main(int argc, char **argv) {
Camera *camera;
int retval, nrcapture = 0;
- time_t lastsec;
struct timeval tval;
GPContext *context = sample_create_context();
@@ -139,7 +138,6 @@ main(int argc, char **argv) {
/*gp_log_add_func(GP_LOG_DATA, errordumper, NULL); */
gp_camera_new(&camera);
- lastsec = time(NULL)-3;
retval = gp_camera_init(camera, context);
if (retval != GP_OK) {
printf("gp_camera_init: %d\n", retval);