Changeset 6554 in ntrip for trunk/clock_and_orbit/readco.c


Ignore:
Timestamp:
Jan 19, 2015, 11:51:09 AM (9 years ago)
Author:
stoecker
Message:

fix some compiler warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/clock_and_orbit/readco.c

    r5669 r6554  
    44#include <string.h>
    55#include <stdlib.h>
     6#include <unistd.h>
    67#include <math.h>
    78
     
    1819
    1920void printClockOrbit(const char* filename, struct ClockOrbit* clockOrb,
    20         char* flag, int ind, char satSys, int offsetGnss);
     21        const char* flag, int ind, char satSys, int offsetGnss);
    2122void printClockOrbitDiff(const char* filename, struct ClockOrbit* clockOrb1,
    22         struct ClockOrbit* clockOrb2, char* flag, int ind, char satSys, int offsetGnss);
     23        struct ClockOrbit* clockOrb2, const char* flag, int ind, char satSys, int offsetGnss);
    2324void printCodeBias(const char* filename, struct CodeBias* codeBias,
    24         char* flag,int ind, char satSys, int offsetGnss);
     25        const char* flag,int ind, char satSys, int offsetGnss);
    2526void printCodeBiasDiff(const char* filename, struct CodeBias* codeBias1,
    26         struct CodeBias* codeBias2, char* flag, int ind, char satSys,
     27        struct CodeBias* codeBias2, const char* flag, int ind, char satSys,
    2728        int offsetGnss);
    2829
    2930int main(void) {
    30     enum COR_SATSYSTEM sys;
    31     char* inputFile = "ssr1_cocb_data/CLK801330.14C";
     31    SATSYS sys;
     32    const char * inputFile = "ssr1_cocb_data/CLK801330.14C";
    3233    for (sys = GPS; sys <= BDS; ++sys) {
    33         char *outFilenameRaw, *outFilenameDbg;
     34        const char *outFilenameRaw, *outFilenameDbg;
    3435        enum COR_SATSYSTEM CLOCKORBIT_SATGNSS = sys;
    3536        enum COR_OFFSETS CLOCKORBIT_OFFSETGNSS;
     
    8485            double cbValue[3] = { 0.0 }, clock_a0 = 0.0, clock_a1 = 0.0, clock_a2 = 0.0, d_radial = 0.0;
    8586            double d_along = 0.0, d_outofplane = 0.0, dd_radial = 0.0, dd_along = 0.0, dd_outofplane = 0.0;
    86             enum CodeType cbType[3] = { 0 };
     87            int cbType[3] = { 0 };
    8788            static double tow_co, tow_cb;
    88             int num = sscanf(buffer, "%d ", &messageType);
     89            sscanf(buffer, "%d ", &messageType);
    8990            if (messageType == messageTypeCo[GPS]) {
    9091                sscanf(buffer,
     
    270271        }
    271272        free(buffer);
    272         close(asciiSsr);
     273        fclose(asciiSsr);
    273274    }
    274275    return 0;
     
    276277
    277278void printClockOrbit(const char* filename, struct ClockOrbit* clockOrb,
    278         char* flag, int ind, char satSys, int offsetGnss) {
     279        const char* flag, int ind, char satSys, int offsetGnss) {
    279280    int i = 0;
    280281    FILE *filestream = fopen(filename, "ab+");
     
    306307
    307308void printClockOrbitDiff(const char* filename, struct ClockOrbit* clockOrb1,
    308         struct ClockOrbit* clockOrb2, char* flag, int ind, char satSys,
     309        struct ClockOrbit* clockOrb2, const char* flag, int ind, char satSys,
    309310        int offsetGnss) {
    310311    int i = 0;
     
    349350}
    350351
    351 void printCodeBias(const char* filename, struct CodeBias* codeBias, char* flag,
     352void printCodeBias(const char* filename, struct CodeBias* codeBias, const char* flag,
    352353        int ind, char satSys, int offsetGnss) {
    353354    int i = 0;
     
    375376
    376377void printCodeBiasDiff(const char* filename, struct CodeBias* codeBias1,
    377         struct CodeBias* codeBias2, char* flag, int ind, char satSys,
     378        struct CodeBias* codeBias2, const char* flag, int ind, char satSys,
    378379        int offsetGnss) {
    379380    int i = 0;
Note: See TracChangeset for help on using the changeset viewer.