pike.git / src / modules / DVB / dvb.c

version» Context lines:

pike.git/src/modules/DVB/dvb.c:794:       THREADS_ALLOW();    n = read(fd,buffer+1,length-1);    THREADS_DISALLOW();    if (n < 0)    {    perror("read error");    return -1;    }    -  if (cks && crc32(buffer+1,n) != 0) +  if (cks && crc32((char *)buffer+1,n) != 0)    {    fprintf(stderr,"crc error\n"); /* FIXME: ??? */    continue;    }       break;    }       return n+1;   }
pike.git/src/modules/DVB/dvb.c:1086:    if (buffer[index]==0x02 || buffer[index]==0x03 || buffer[index]==0x04)    {    unsigned int i = index+5;    while (i < index+5+data_len)    {    switch (buffer[i])    {    case 0x0a:    if (buffer[index]==3 || buffer[index]==4) {    push_text("lang"); -  push_string(make_shared_binary_string(&buffer[i+2], 3)); cnt++; +  push_string(make_shared_binary_string((char *)&buffer[i+2], 3)); cnt++;    }    break;    case 0x09:    ParseCADescriptor(&stream, &buffer[i+2],buffer[i+1]);    break;    }    i += 2 + buffer[i+1];    }    }    f_aggregate_mapping( 2 * cnt );
pike.git/src/modules/DVB/dvb.c:1359:    *! @note    *! Read buffer size is 4096 by default.    *!    *! @seealso    *! @[DVB.dvb()->stream()], @[close()]    */   static void f_stream_read(INT32 args) {       dvb_stream_data *dvb_stream = DVBStream;    int all = 1, ret, e, cnt, ix = 0; -  char buf[MAX_DVB_READ_SIZE], *bufptr; +  unsigned char buf[MAX_DVB_READ_SIZE], *bufptr;       if(dvb_stream->fd < 0)    Pike_error("Object destroyed!\n");       check_all_args("DVB.dvb->stream_read", args, BIT_INT | BIT_VOID, 0);    if(args > 1)    all = (u_short)Pike_sp[-1].u.integer;    pop_n_elems(args);       if(dvb_stream->pkt.payload_len > 0)
pike.git/src/modules/DVB/dvb.c:1657:    else    push_int(1);      }   /*! @endclass    */      /*! @endmodule    */    - static void init_dvb_data(struct object *obj) { + static void init_dvb_data(struct object *UNUSED(obj)) {       unsigned int i;       DVB->cardn = -1;    DVB->stream = NULL;    memset(&DVB->low_errmsg, '\0', sizeof(DVB->low_errmsg));   }      static void exit_dvb_stream(struct object *obj); - static void exit_dvb_data(struct object *obj) { + static void exit_dvb_data(struct object *UNUSED(obj)) {       dvb_stream_data *s;       if(DVB->cardn != -1) {    close(DVB->fefd);    s = DVB->stream;    while (s != NULL) {    s = s->next;    exit_dvb_stream((struct object *)s);    }    }   }    - static void init_dvb_audio(struct object *obj) { + static void init_dvb_audio(struct object *UNUSED(obj)) {    DVBAudio->fd = -1;    memset(&DVBAudio->low_errmsg, '\0', sizeof(DVBAudio->low_errmsg));   }    - static void exit_dvb_audio(struct object *obj) { + static void exit_dvb_audio(struct object *UNUSED(obj)) {    if(DVBAudio->fd != -1)    close(DVBAudio->fd);   }    - static void init_dvb_stream(struct object *obj) { + static void init_dvb_stream(struct object *UNUSED(obj)) {       DVBStream->parent = NULL;    DVBStream->next = NULL;    DVBStream->fd = -1;    DVBStream->pid = 0;    DVBStream->pkt.payload = NULL;    DVBStream->buflen = MAX_DVB_READ_SIZE;    DVBStream->ecminfo = NULL;    memset(&DVBStream->low_errmsg, '\0', sizeof(DVBStream->low_errmsg));   }       - static void exit_dvb_stream(struct object *obj) { + static void exit_dvb_stream(struct object *UNUSED(obj)) {       struct ECMINFO *e;    unsigned int i;       sl_del(DVBStream->parent, DVBStream);    if(DVBStream->fd != -1) {    close(DVBStream->fd);    if(DVBStream->pkt.payload != NULL)    free(DVBStream->pkt.payload);    }