Changeset 1627


Ignore:
Timestamp:
07/27/10 17:06:31 (3 years ago)
Author:
salcock
Message:
  • Fix warnings in tutorial code
Location:
trunk/examples/tutorial
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/tutorial/headerdemo.c

    r1502 r1627  
    6666         */ 
    6767 
    68         while (ts.tv_sec > next_report) { 
     68        while ((uint32_t)ts.tv_sec > next_report) { 
    6969                /* Print all our stats */ 
    7070                print_stats(); 
  • trunk/examples/tutorial/lengthdemo.c

    r1502 r1627  
    4242         * with periods in which no packets are observed. 
    4343         */ 
    44         while (ts.tv_sec > next_report) { 
     44        while ((uint32_t)ts.tv_sec > next_report) { 
    4545 
    4646                /* Print the timestamp for the report */ 
  • trunk/examples/tutorial/readdemo.c

    r1502 r1627  
    66#include <inttypes.h> 
    77#include <err.h> 
     8#include <assert.h> 
    89 
    910uint64_t count = 0; 
     
    1213static void per_packet(libtrace_packet_t *packet) 
    1314{ 
     15        assert(packet); 
    1416        /* This function turns out to be really simple, because we are just 
    1517         * counting the number of packets in the trace */ 
  • trunk/examples/tutorial/timedemo.c

    r1502 r1627  
    3838         * with periods in which no packets are observed. 
    3939         */ 
    40         while (ts.tv_sec > next_report) { 
     40        while ((uint32_t)ts.tv_sec > next_report) { 
    4141                /* Print a timestamp for the report and the packet count */ 
    4242                printf("%u \t%" PRIu64 "\n", next_report, count); 
Note: See TracChangeset for help on using the changeset viewer.