Changeset 9c6aa95 for lib/format_wag.c


Ignore:
Timestamp:
10/07/05 17:31:17 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
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:
9daf398
Parents:
5c88a60
Message:

cleaned up after compiling with -Wall -W

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_wag.c

    rb69afb1 r9c6aa95  
    2929 */
    3030
     31#define _GNU_SOURCE
    3132#include "libtrace.h"
    3233#include "libtrace_int.h"
     
    5960#include <netdb.h>
    6061#include <stdio.h>
     62#include <string.h>
     63#include <stdlib.h>
    6164
    6265#ifdef HAVE_LIMITS_H
     
    120123static int wag_init_input(struct libtrace_t *libtrace) {
    121124        struct stat buf;
    122         struct hostent *he;
    123         struct sockaddr_in remote;
    124125        struct sockaddr_un unix_sock;
    125126        libtrace->format_data = (struct libtrace_format_data_t *)
     
    225226                                break;
    226227                        default:
    227                                 printf("Bad argument to wag: %s\n", opt);
     228                                printf("Bad argument to wag: %s\n", optarg);
    228229                                return -1;
    229230                }
     
    248249        fclose(INPUT.file);     
    249250#endif
     251        return 0;
    250252}
    251253
     
    256258        fclose(OUTPUT.file);
    257259#endif
     260        return 0;
    258261}
    259262
    260263static int wag_read(struct libtrace_t *libtrace, void *buffer, size_t len) {
    261264        int numbytes;
    262         static short lctr = 0;
    263         int rlen;
    264265        assert(libtrace);
    265         assert(len >= 0);
    266266
    267267        if (buffer == 0)
     
    312312        char buf[RP_BUFSIZE];
    313313        int read_required = 0;
    314         struct wag_frame_hdr *waghdr = 0;
    315314
    316315        void *buffer = 0;
     
    389388}
    390389
    391 static libtrace_linktype_t wag_get_link_type(const struct libtrace_packet_t *packet) {
     390static libtrace_linktype_t wag_get_link_type(const struct libtrace_packet_t *packet __attribute__((unused))) {
    392391        return TRACE_TYPE_80211;
    393392}
     
    435434        }
    436435}
    437 static int wag_help() {
     436static void wag_help() {
    438437        printf("wag format module: $Revision$\n");
    439438        printf("Supported input URIs:\n");
     
    448447        printf("\tnone\n");
    449448        printf("\n");
    450 
    451449}
    452450
Note: See TracChangeset for help on using the changeset viewer.