Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lafenghu
psgplay
psgplay-codecleanup.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File psgplay-codecleanup.diff of Package psgplay
--- src/audio.c +++ src/audio.c @@ -1,4 +1,5 @@ #include <stdio.h> +#include <stdlib.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/ioctl.h> --- src/file.c +++ src/file.c @@ -33,7 +33,7 @@ if(tmp2) { - raw->buffer = (char *) malloc(raw->size); + raw->buffer = (unsigned char *) malloc(raw->size); fd = open(filename, O_RDONLY); read(fd, raw->buffer, raw->size); close(fd); @@ -47,7 +47,7 @@ fclose(fp); raw->size = SWAPLTOLITTLE(*(long *)gzsize); gz = gzopen(filename, "rb"); - raw->buffer = (char *) malloc(raw->size); + raw->buffer = (unsigned char *) malloc(raw->size); gzread(gz, raw->buffer, raw->size); gzclose(gz); return raw; --- src/main.c +++ src/main.c @@ -120,6 +120,7 @@ exit(1); break; default: + break; } } --- src/psg.c +++ src/psg.c @@ -1,6 +1,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <string.h> #include "psg.h" #define MODE_SQUARE 0 @@ -90,7 +91,7 @@ else new->timer_count = old->timer_count; - new->timer_vmax = 15; (tmp2[5] & 0xf0) >> 4; + new->timer_vmax = 15; /* (tmp2[5] & 0xf0) >> 4; */ } } @@ -181,10 +182,10 @@ return 0; } head->regs = 16; - head->name = data + 34; + head->name = (char *)data + 34; head->name2 = head->name + strlen(head->name) + 1; head->name3 = head->name2 + strlen(head->name2) + 1; - head->data = head->name3 + strlen(head->name3) + 1; + head->data = (unsigned char *)head->name3 + strlen(head->name3) + 1; if(set->verbose) { fprintf(stderr, "1: %s\n", head->name); fprintf(stderr, "2: %s\n", head->name2);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor