Changeset d025ff7 for examples


Ignore:
Timestamp:
07/27/10 17:06:31 (10 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
f724640
Parents:
8608a0fa
Message:
  • Fix warnings in tutorial code
Location:
examples/tutorial
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • examples/tutorial/headerdemo.c

    r8835f5a rd025ff7  
    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();
  • examples/tutorial/lengthdemo.c

    r8835f5a rd025ff7  
    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 */
  • examples/tutorial/readdemo.c

    r8835f5a rd025ff7  
    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 */
  • examples/tutorial/timedemo.c

    r8835f5a rd025ff7  
    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.