From 2a26ba451a605c185242de50e1d91eeac0a2430e Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 6 Mar 2016 21:27:25 -0600 Subject: Fix warning (toys.optflags is a long long now). --- toys/example/skeleton.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toys/example/skeleton.c b/toys/example/skeleton.c index 99e771aa..ee67b58f 100644 --- a/toys/example/skeleton.c +++ b/toys/example/skeleton.c @@ -1,4 +1,5 @@ /* skeleton.c - Example program to act as template for new commands. + * (Although really, half the time copying hello.c is easier.) * * Copyright 2014 Rob Landley * @@ -70,7 +71,7 @@ void skeleton_main(void) // Command line options parsing is done for you by lib/args.c called // from main.c using the optstring in the NEWTOY macros. Display results. - if (toys.optflags) printf("flags=%x\n", toys.optflags); + if (toys.optflags) printf("flags=%llx\n", toys.optflags); if (toys.optflags & FLAG_a) printf("Saw a\n"); if (toys.optflags & FLAG_b) printf("b=%s\n", TT.s.b_string); if (toys.optflags & FLAG_c) printf("c=%ld\n", TT.s.c_number); @@ -95,7 +96,7 @@ void skeleton_main(void) void skeleton_alias_main(void) { printf("Ran %s\n", toys.which->name); - printf("flags=%x\n", toys.optflags); + printf("flags=%llx\n", toys.optflags); // Note, this FLAG_b is a different bit position than the other FLAG_b, // and fills out a different variable of a different type. -- cgit v1.2.3