Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 272358
Collapse All | Expand All

(-)libs/libmythtv/hdhomerun/hdhomerun_config.c (-1 / +1 lines)
Lines 252-258 Link Here
252
			continue;
252
			continue;
253
		}
253
		}
254
		while (1) {
254
		while (1) {
255
			char *end = strchr(streaminfo, '\n');
255
			char *end = (char *)strchr(streaminfo, '\n');
256
			if (!end) {
256
			if (!end) {
257
				break;
257
				break;
258
			}
258
			}
(-)libs/libmythtv/vbitext/lang.c (-1 / +1 lines)
Lines 175-181 Link Here
175
                           struct mark *mark = marks + (mode - 16);
175
                           struct mark *mark = marks + (mode - 16);
176
                           char *x;
176
                           char *x;
177
177
178
                           if ((x = strchr(mark->g0, data)))
178
                           if ((x = (char *)strchr(mark->g0, data)))
179
                           {
179
                           {
180
                               if (latin1)
180
                               if (latin1)
181
                                   data = mark->latin1[x - mark->g0];
181
                                   data = mark->latin1[x - mark->g0];
(-)libs/libmythtv/xine_demux_sputext.c (-3 / +3 lines)
Lines 112-118 Link Here
112
  this->buflen += nread;
112
  this->buflen += nread;
113
  this->buf[this->buflen] = '\0';
113
  this->buf[this->buflen] = '\0';
114
114
115
  s = strchr(this->buf, '\n');
115
  s = (char *)strchr(this->buf, '\n');
116
116
117
  if (line && (s || this->buflen)) {
117
  if (line && (s || this->buflen)) {
118
    
118
    
Lines 163-169 Link Here
163
      break;
163
      break;
164
      
164
      
165
    case 2: /* find ">" */
165
    case 2: /* find ">" */
166
      if ((s = strchr (s, '>'))) { s++; state = 3; p = text; continue; }
166
      if ((s = (char *)strchr (s, '>'))) { s++; state = 3; p = text; continue; }
167
      break;
167
      break;
168
      
168
      
169
    case 3: /* get all text until '<' appears */
169
    case 3: /* get all text until '<' appears */
Lines 190-196 Link Here
190
	if (current->lines > 0) { state = 99; break; }
190
	if (current->lines > 0) { state = 99; break; }
191
	state = 0; continue;
191
	state = 0; continue;
192
      }
192
      }
193
      s = strchr (s, '>');
193
      s = (char *)strchr (s, '>');
194
      if (s) { s++; state = 3; continue; }
194
      if (s) { s++; state = 3; continue; }
195
      break;
195
      break;
196
    }
196
    }
(-)libs/libavcodec/utils.c (-2 / +2 lines)
Lines 1512-1520 Link Here
1512
         }
1512
         }
1513
1513
1514
    /* Then, we try to parse it as fraction */
1514
    /* Then, we try to parse it as fraction */
1515
    cp = strchr(arg, '/');
1515
    cp = (char *)strchr(arg, '/');
1516
    if (!cp)
1516
    if (!cp)
1517
        cp = strchr(arg, ':');
1517
        cp = (char *)strchr(arg, ':');
1518
    if (cp) {
1518
    if (cp) {
1519
        char* cpp;
1519
        char* cpp;
1520
        frame_rate->num = strtol(arg, &cpp, 10);
1520
        frame_rate->num = strtol(arg, &cpp, 10);
(-)libs/libavcodec/ratecontrol.c (-2 / +2 lines)
Lines 133-139 Link Here
133
        /* find number of pics */
133
        /* find number of pics */
134
        p= s->avctx->stats_in;
134
        p= s->avctx->stats_in;
135
        for(i=-1; p; i++){
135
        for(i=-1; p; i++){
136
            p= strchr(p+1, ';');
136
            p= (char *)strchr(p+1, ';');
137
        }
137
        }
138
        i+= s->max_b_frames;
138
        i+= s->max_b_frames;
139
        if(i<=0 || i>=INT_MAX / sizeof(RateControlEntry))
139
        if(i<=0 || i>=INT_MAX / sizeof(RateControlEntry))
Lines 158-164 Link Here
158
            int e;
158
            int e;
159
            char *next;
159
            char *next;
160
160
161
            next= strchr(p, ';');
161
            next= (char *)strchr(p, ';');
162
            if(next){
162
            if(next){
163
                (*next)=0; //sscanf in unbelievably slow on looong strings //FIXME copy / do not write
163
                (*next)=0; //sscanf in unbelievably slow on looong strings //FIXME copy / do not write
164
                next++;
164
                next++;
(-)libs/libavcodec/eval.c (-1 / +1 lines)
Lines 216-222 Link Here
216
        }
216
        }
217
    }
217
    }
218
218
219
    p->s= strchr(p->s, '(');
219
    p->s= (char *)strchr(p->s, '(');
220
    if(p->s==NULL){
220
    if(p->s==NULL){
221
        *p->error = "missing (";
221
        *p->error = "missing (";
222
        p->s= next;
222
        p->s= next;
(-)libs/libavformat/rtpproto.c (-1 / +1 lines)
Lines 123-129 Link Here
123
    is_multicast = 0;
123
    is_multicast = 0;
124
    ttl = -1;
124
    ttl = -1;
125
    local_port = -1;
125
    local_port = -1;
126
    p = strchr(uri, '?');
126
    p = (char *)strchr(uri, '?');
127
    if (p) {
127
    if (p) {
128
        is_multicast = find_info_tag(buf, sizeof(buf), "multicast", p);
128
        is_multicast = find_info_tag(buf, sizeof(buf), "multicast", p);
129
        if (find_info_tag(buf, sizeof(buf), "ttl", p)) {
129
        if (find_info_tag(buf, sizeof(buf), "ttl", p)) {
(-)libs/libavformat/matroskadec.c (-1 / +1 lines)
Lines 1357-1363 Link Here
1357
                char *text, *end;
1357
                char *text, *end;
1358
                if ((res = ebml_read_utf8(matroska, &id, &text)) < 0)
1358
                if ((res = ebml_read_utf8(matroska, &id, &text)) < 0)
1359
                    break;
1359
                    break;
1360
                if ((end = strchr(text, '-')))
1360
                if ((end = (char *)strchr(text, '-')))
1361
                    *end = '\0';
1361
                    *end = '\0';
1362
                if (strlen(text) == 3)
1362
                if (strlen(text) == 3)
1363
                    strcpy(track->language, text);
1363
                    strcpy(track->language, text);
(-)libs/libavformat/rtsp.c (-2 / +2 lines)
Lines 857-870 Link Here
857
        port = RTSP_DEFAULT_PORT;
857
        port = RTSP_DEFAULT_PORT;
858
858
859
    /* search for options */
859
    /* search for options */
860
    option_list = strchr(path, '?');
860
    option_list = (char *)strchr(path, '?');
861
    if (option_list) {
861
    if (option_list) {
862
        /* remove the options from the path */
862
        /* remove the options from the path */
863
        *option_list++ = 0;
863
        *option_list++ = 0;
864
        while(option_list) {
864
        while(option_list) {
865
            /* move the option pointer */
865
            /* move the option pointer */
866
            option = option_list;
866
            option = option_list;
867
            option_list = strchr(option_list, '&');
867
            option_list = (char *)strchr(option_list, '&');
868
            if (option_list)
868
            if (option_list)
869
                *(option_list++) = 0;
869
                *(option_list++) = 0;
870
            /* handle the options */
870
            /* handle the options */
(-)libs/libavformat/utils.c (-7 / +7 lines)
Lines 3131-3137 Link Here
3131
    if (path_size > 0)          path[0] = 0;
3131
    if (path_size > 0)          path[0] = 0;
3132
3132
3133
    /* parse protocol */
3133
    /* parse protocol */
3134
    if ((p = strchr(url, ':'))) {
3134
    if ((p = (char *)strchr(url, ':'))) {
3135
        av_strlcpy(proto, url, FFMIN(proto_size, p + 1 - url));
3135
        av_strlcpy(proto, url, FFMIN(proto_size, p + 1 - url));
3136
        p++; /* skip ':' */
3136
        p++; /* skip ':' */
3137
        if (*p == '/') p++;
3137
        if (*p == '/') p++;
Lines 3143-3172 Link Here
3143
    }
3143
    }
3144
3144
3145
    /* separate path from hostname */
3145
    /* separate path from hostname */
3146
    if ((ls = strchr(p, '/'))) {
3146
    if ((ls = (char *)strchr(p, '/'))) {
3147
        if ((q = strchr(ls, '?')))
3147
        if ((q = (char *)strchr(ls, '?')))
3148
            av_strlcpy(path, ls, FFMIN(path_size, q - ls + 1));
3148
            av_strlcpy(path, ls, FFMIN(path_size, q - ls + 1));
3149
        else
3149
        else
3150
            av_strlcpy(path, ls, path_size);
3150
            av_strlcpy(path, ls, path_size);
3151
    } else if (!(ls = strchr(p, '?')))
3151
    } else if (!(ls = (char *)strchr(p, '?')))
3152
        ls = &p[strlen(p)]; // XXX
3152
        ls = &p[strlen(p)]; // XXX
3153
3153
3154
    /* the rest is hostname, use that to parse auth/port */
3154
    /* the rest is hostname, use that to parse auth/port */
3155
    if (ls != p) {
3155
    if (ls != p) {
3156
        /* authorization (user[:pass]@hostname) */
3156
        /* authorization (user[:pass]@hostname) */
3157
        if ((at = strchr(p, '@')) && at < ls) {
3157
        if ((at = (char *)strchr(p, '@')) && at < ls) {
3158
            av_strlcpy(authorization, p,
3158
            av_strlcpy(authorization, p,
3159
                       FFMIN(authorization_size, at + 1 - p));
3159
                       FFMIN(authorization_size, at + 1 - p));
3160
            p = at + 1; /* skip '@' */
3160
            p = at + 1; /* skip '@' */
3161
        }
3161
        }
3162
3162
3163
        if (*p == '[' && (brk = strchr(p, ']')) && brk < ls) {
3163
        if (*p == '[' && (brk = (char *)strchr(p, ']')) && brk < ls) {
3164
            /* [host]:port */
3164
            /* [host]:port */
3165
            av_strlcpy(hostname, p + 1,
3165
            av_strlcpy(hostname, p + 1,
3166
                       FFMIN(hostname_size, brk - p));
3166
                       FFMIN(hostname_size, brk - p));
3167
            if (brk[1] == ':' && port_ptr)
3167
            if (brk[1] == ':' && port_ptr)
3168
                *port_ptr = atoi(brk + 2);
3168
                *port_ptr = atoi(brk + 2);
3169
        } else if ((col = strchr(p, ':')) && col < ls) {
3169
        } else if ((col = (char *)strchr(p, ':')) && col < ls) {
3170
            av_strlcpy(hostname, p,
3170
            av_strlcpy(hostname, p,
3171
                       FFMIN(col + 1 - p, hostname_size));
3171
                       FFMIN(col + 1 - p, hostname_size));
3172
            if (port_ptr) *port_ptr = atoi(col + 1);
3172
            if (port_ptr) *port_ptr = atoi(col + 1);
(-)libs/libavformat/http.c (-1 / +1 lines)
Lines 195-201 Link Here
195
            if (!strncmp (p, "bytes ", 6)) {
195
            if (!strncmp (p, "bytes ", 6)) {
196
                p += 6;
196
                p += 6;
197
                s->off = atoll(p);
197
                s->off = atoll(p);
198
                if ((slash = strchr(p, '/')) && strlen(slash) > 0)
198
                if ((slash = (char *)strchr(p, '/')) && strlen(slash) > 0)
199
                    s->filesize = atoll(slash+1);
199
                    s->filesize = atoll(slash+1);
200
            }
200
            }
201
            h->is_streamed = 0; /* we _can_ in fact seek */
201
            h->is_streamed = 0; /* we _can_ in fact seek */
(-)libs/libavformat/sdp.c (-1 / +1 lines)
Lines 73-79 Link Here
73
    url_split(NULL, 0, NULL, 0, dest_addr, size, &port, NULL, 0, url);
73
    url_split(NULL, 0, NULL, 0, dest_addr, size, &port, NULL, 0, url);
74
74
75
    *ttl = 0;
75
    *ttl = 0;
76
    p = strchr(url, '?');
76
    p = (char *)strchr(url, '?');
77
    if (p) {
77
    if (p) {
78
        char buff[64];
78
        char buff[64];
79
        int is_multicast = find_info_tag(buff, sizeof(buff), "multicast", p);
79
        int is_multicast = find_info_tag(buff, sizeof(buff), "multicast", p);
(-)libs/libavformat/udp.c (-1 / +1 lines)
Lines 325-331 Link Here
325
325
326
    h->priv_data = s;
326
    h->priv_data = s;
327
    s->ttl = 16;
327
    s->ttl = 16;
328
    p = strchr(uri, '?');
328
    p = (char *)strchr(uri, '?');
329
    if (p) {
329
    if (p) {
330
        s->is_multicast = find_info_tag(buf, sizeof(buf), "multicast", p);
330
        s->is_multicast = find_info_tag(buf, sizeof(buf), "multicast", p);
331
        s->reuse_socket = find_info_tag(buf, sizeof(buf), "reuse", p);
331
        s->reuse_socket = find_info_tag(buf, sizeof(buf), "reuse", p);
(-)libs/libavformat/x11grab.c (-1 / +1 lines)
Lines 98-104 Link Here
98
    char *param, *offset;
98
    char *param, *offset;
99
99
100
    param = av_strdup(s1->filename);
100
    param = av_strdup(s1->filename);
101
    offset = strchr(param, '+');
101
    offset = (char *)strchr(param, '+');
102
    if (offset) {
102
    if (offset) {
103
        sscanf(offset, "%d,%d", &x_off, &y_off);
103
        sscanf(offset, "%d,%d", &x_off, &y_off);
104
        *offset= 0;
104
        *offset= 0;
(-)libs/libavformat/nsvdec.c (-2 / +2 lines)
Lines 325-337 Link Here
325
            if (p >= endp-2)
325
            if (p >= endp-2)
326
                break;
326
                break;
327
            token = p;
327
            token = p;
328
            p = strchr(p, '=');
328
            p = (char *)strchr(p, '=');
329
            if (!p || p >= endp-2)
329
            if (!p || p >= endp-2)
330
                break;
330
                break;
331
            *p++ = '\0';
331
            *p++ = '\0';
332
            quote = *p++;
332
            quote = *p++;
333
            value = p;
333
            value = p;
334
            p = strchr(p, quote);
334
            p = (char *)strchr(p, quote);
335
            if (!p || p >= endp)
335
            if (!p || p >= endp)
336
                break;
336
                break;
337
            *p++ = '\0';
337
            *p++ = '\0';
(-)libs/libavformat/tcp.c (-1 / +1 lines)
Lines 43-49 Link Here
43
    url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname),
43
    url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname),
44
      &port, path, sizeof(path), uri);  // PETR: use url_split
44
      &port, path, sizeof(path), uri);  // PETR: use url_split
45
    if (strcmp(proto,"tcp")) goto fail; // PETR: check protocol
45
    if (strcmp(proto,"tcp")) goto fail; // PETR: check protocol
46
    if ((q = strchr(hostname,'@'))) { strcpy(tmp,q+1); strcpy(hostname,tmp); } // PETR: take only the part after '@' for tcp protocol
46
    if ((q = (char *)strchr(hostname,'@'))) { strcpy(tmp,q+1); strcpy(hostname,tmp); } // PETR: take only the part after '@' for tcp protocol
47
47
48
    s = av_malloc(sizeof(TCPContext));
48
    s = av_malloc(sizeof(TCPContext));
49
    if (!s)
49
    if (!s)
(-)libs/libmyth/qmdcodec.cpp (-1 / +1 lines)
Lines 128-134 Link Here
128
128
129
129
130
/******************************** QCodecs ********************************/
130
/******************************** QCodecs ********************************/
131
// strchr(3) for broken systems.
131
// (char *)strchr(3) for broken systems.
132
static int rikFindChar(register const char * _s, const char c)
132
static int rikFindChar(register const char * _s, const char c)
133
{
133
{
134
  register const char * s = _s;
134
  register const char * s = _s;
(-)libs/libmythdvdnav/dvd_reader.c (-1 / +1 lines)
Lines 353-359 Link Here
353
    if( ret < 0 ) {
353
    if( ret < 0 ) {
354
354
355
        /* maybe "host:port" url? try opening it with acCeSS library */
355
        /* maybe "host:port" url? try opening it with acCeSS library */
356
        if( strchr(path,':') ) {
356
        if( (char *)strchr(path,':') ) {
357
			ret_val = DVDOpenImageFile( path, have_css );
357
			ret_val = DVDOpenImageFile( path, have_css );
358
			free(path);
358
			free(path);
359
	        return ret_val;
359
	        return ret_val;
(-)libs/libmythfreemheg/Text.cpp (-4 / +4 lines)
Lines 243-268 Link Here
243
    else { // Textual form.
243
    else { // Textual form.
244
        const unsigned char *str = attrs.Bytes();
244
        const unsigned char *str = attrs.Bytes();
245
        const char *p = (const char *)str;
245
        const char *p = (const char *)str;
246
        char *q = strchr(p, '.'); // Find the terminating dot
246
        char *q = (char *)strchr(p, '.'); // Find the terminating dot
247
        if (q != NULL) { // plain, italic etc.
247
        if (q != NULL) { // plain, italic etc.
248
            if (q-p == 6 && strncmp(p, "italic", 6) == 0) style = 1;
248
            if (q-p == 6 && strncmp(p, "italic", 6) == 0) style = 1;
249
            else if (q-p == 4 && strncmp(p, "bold", 4) == 0) style = 2;
249
            else if (q-p == 4 && strncmp(p, "bold", 4) == 0) style = 2;
250
            else if (q-p == 11 && strncmp(p, "bold-italic", 11) == 0) style = 3;
250
            else if (q-p == 11 && strncmp(p, "bold-italic", 11) == 0) style = 3;
251
            // else it's plain.
251
            // else it's plain.
252
            p = q+1;
252
            p = q+1;
253
            q = strchr(p, '.'); // Find the next dot.
253
            q = (char *)strchr(p, '.'); // Find the next dot.
254
        }
254
        }
255
        if (q != NULL) { // Size
255
        if (q != NULL) { // Size
256
            size = atoi(p);
256
            size = atoi(p);
257
            if (size == 0) size = 0x18;
257
            if (size == 0) size = 0x18;
258
            p = q+1;
258
            p = q+1;
259
            q = strchr(p, '.'); // Find the next dot.
259
            q = (char *)strchr(p, '.'); // Find the next dot.
260
        }
260
        }
261
        if (q != NULL) { // lineSpacing
261
        if (q != NULL) { // lineSpacing
262
            lineSpace = atoi(p);
262
            lineSpace = atoi(p);
263
            if (lineSpace == 0) size = 0x18;
263
            if (lineSpace == 0) size = 0x18;
264
            p = q+1;
264
            p = q+1;
265
            q = strchr(p, '.'); // Find the next dot.
265
            q = (char *)strchr(p, '.'); // Find the next dot.
266
        }
266
        }
267
        if (q != NULL) { // letter spacing.  May be zero or negative
267
        if (q != NULL) { // letter spacing.  May be zero or negative
268
            letterSpace = atoi(p);
268
            letterSpace = atoi(p);

Return to bug 272358