mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
fix some compiler warnings in Arch
This commit is contained in:
@@ -334,8 +334,8 @@ language_t* master_playlist_process_language(const char * data, int *slices, int
|
|||||||
size_t length = 0;
|
size_t length = 0;
|
||||||
ptr = data;
|
ptr = data;
|
||||||
for (int i = 1; i <= count; i++) {
|
for (int i = 1; i <= count; i++) {
|
||||||
char *end;
|
const char *end;
|
||||||
int len_name;
|
int len_name;
|
||||||
if (!(ptr = strstr(ptr, "#EXT-X-MEDIA"))) {
|
if (!(ptr = strstr(ptr, "#EXT-X-MEDIA"))) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -692,14 +692,14 @@ int analyze_media_playlist(char *playlist, float *duration, bool *endlist) {
|
|||||||
/* parse Master Playlist, make table of Media Playlist uri's that it lists */
|
/* parse Master Playlist, make table of Media Playlist uri's that it lists */
|
||||||
int create_media_uri_table(const char *url_prefix, const char *master_playlist_data,
|
int create_media_uri_table(const char *url_prefix, const char *master_playlist_data,
|
||||||
int datalen, char ***media_uri_table, int *num_uri) {
|
int datalen, char ***media_uri_table, int *num_uri) {
|
||||||
char *ptr = strstr(master_playlist_data, url_prefix);
|
const char *ptr = strstr(master_playlist_data, url_prefix);
|
||||||
char ** table = NULL;
|
char ** table = NULL;
|
||||||
if (ptr == NULL) {
|
if (ptr == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
int count = 0;
|
int count = 0;
|
||||||
while (ptr != NULL) {
|
while (ptr != NULL) {
|
||||||
char *end = strstr(ptr, "m3u8");
|
const char *end = strstr(ptr, "m3u8");
|
||||||
if (end == NULL) {
|
if (end == NULL) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -717,8 +717,8 @@ int create_media_uri_table(const char *url_prefix, const char *master_playlist_d
|
|||||||
ptr = strstr(master_playlist_data, url_prefix);
|
ptr = strstr(master_playlist_data, url_prefix);
|
||||||
count = 0;
|
count = 0;
|
||||||
while (ptr != NULL) {
|
while (ptr != NULL) {
|
||||||
char *end = strstr(ptr, "m3u8");
|
const char *end = strstr(ptr, "m3u8");
|
||||||
char *uri;
|
char *uri;
|
||||||
if (end == NULL) {
|
if (end == NULL) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -851,7 +851,7 @@ char *adjust_yt_condensed_playlist(const char *media_playlist) {
|
|||||||
const char **params_start = NULL;
|
const char **params_start = NULL;
|
||||||
if (strlen(params)) {
|
if (strlen(params)) {
|
||||||
nparams = 1;
|
nparams = 1;
|
||||||
char * comma = strchr(params, ',');
|
const char * comma = strchr(params, ',');
|
||||||
while (comma) {
|
while (comma) {
|
||||||
nparams++;
|
nparams++;
|
||||||
comma++;
|
comma++;
|
||||||
@@ -909,7 +909,7 @@ char *adjust_yt_condensed_playlist(const char *media_playlist) {
|
|||||||
while (ptr) {
|
while (ptr) {
|
||||||
/* for each chunk */
|
/* for each chunk */
|
||||||
const char *end = NULL;
|
const char *end = NULL;
|
||||||
char *start = strstr(ptr, prefix);
|
const char *start = strstr(ptr, prefix);
|
||||||
len = start - ptr;
|
len = start - ptr;
|
||||||
/* copy first line of chunk entry */
|
/* copy first line of chunk entry */
|
||||||
memcpy(new_pos, old_pos, len);
|
memcpy(new_pos, old_pos, len);
|
||||||
|
|||||||
@@ -691,7 +691,7 @@ raop_handler_setup(raop_conn_t *conn,
|
|||||||
char nonce_string[33] = { '\0' };
|
char nonce_string[33] = { '\0' };
|
||||||
//bool stale = false; //not implemented
|
//bool stale = false; //not implemented
|
||||||
if (len && authorization) {
|
if (len && authorization) {
|
||||||
char *ptr = strstr(authorization, "nonce=\"") + strlen("nonce=\"");
|
const char *ptr = strstr(authorization, "nonce=\"") + strlen("nonce=\"");
|
||||||
strncpy(nonce_string, ptr, 32);
|
strncpy(nonce_string, ptr, 32);
|
||||||
const char *method = http_request_get_method(request);
|
const char *method = http_request_get_method(request);
|
||||||
conn->authenticated = pairing_digest_verify(method, authorization, password);
|
conn->authenticated = pairing_digest_verify(method, authorization, password);
|
||||||
|
|||||||
Reference in New Issue
Block a user