* Initialize some variables.

This commit is contained in:
Justin Maggard 2009-03-19 21:42:13 +00:00
parent ac5a37b27a
commit 06784a31ca
6 changed files with 10 additions and 9 deletions

View File

@ -12,7 +12,7 @@
#
#CFLAGS = -Wall -O -D_GNU_SOURCE -g -DDEBUG
#CFLAGS = -Wall -g -Os -D_GNU_SOURCE
CFLAGS = -Wall -g -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
CFLAGS = -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
-I/usr/include/ffmpeg \
-I/usr/include/libavutil -I/usr/include/libavcodec -I/usr/include/libavformat \
-I/usr/include/ffmpeg/libavutil -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavformat

View File

@ -235,7 +235,7 @@ image *
image_new_from_jpeg(const char * path, int is_file, const char * buf, int size)
{
image *vimage;
FILE *file;
FILE *file = NULL;
struct jpeg_decompress_struct cinfo;
unsigned char *line[16], *ptr;
int x, y, i, w, h, ofs;

View File

@ -262,7 +262,7 @@ inotify_insert_file(char * name, const char * path)
char * base_name = malloc(strlen(path));
char * base_copy = base_name;
char * parent_buf = NULL;
char * id;
char * id = NULL;
int depth = 1;
/* If it's already in the database, just skip it for now.
@ -345,7 +345,7 @@ inotify_insert_directory(int fd, char *name, const char * path)
struct dirent * e;
char * sql;
char **result;
char *id, *path_buf, *parent_buf, *esc_name;
char *id=NULL, *path_buf, *parent_buf, *esc_name;
int wd;
int rows, i = 0;
@ -537,7 +537,7 @@ start_inotify()
char * esc_name = NULL;
char * path_buf = NULL;
if (setpriority(PRIO_PROCESS, 0, 15) == -1)
if (setpriority(PRIO_PROCESS, 0, 19) == -1)
DPRINTF(E_WARN, L_INOTIFY, "Failed to reduce inotify thread priority\n");
fd = inotify_init();

View File

@ -596,7 +596,7 @@ main(int argc, char * * argv)
int last_changecnt = 0;
#ifdef TIVO_SUPPORT
unsigned short int loop_cnt = 0;
int sbeacon;
int sbeacon = -1;
struct sockaddr_in tivo_bcast;
#endif
char * sql;

View File

@ -385,7 +385,7 @@ insert_directory(const char * name, const char * path, const char * base, const
{
char * sql;
int ret, rows, found = 0;
sqlite_int64 detailID;
sqlite_int64 detailID = 0;
char * refID = NULL;
char class[] = "container.storageFolder";
char * id_buf = NULL;
@ -696,7 +696,7 @@ void
ScanDirectory(const char * dir, const char * parent, enum media_types type)
{
struct dirent **namelist;
int n, i, startID = 0;
int i, n, startID=0;
char parent_id[PATH_MAX];
char full_path[PATH_MAX];
char * name = NULL;
@ -722,6 +722,7 @@ ScanDirectory(const char * dir, const char * parent, enum media_types type)
n = scandir(".", &namelist, filter_images, alphasort);
break;
default:
n = -1;
break;
}
if (n < 0) {

View File

@ -31,7 +31,7 @@ decodeString(char * string, int inplace)
if( !string )
return NULL;
int alloc = (int)strlen(string)+1;
char *ns;
char * ns = NULL;
unsigned char in;
int strindex=0;
long hex;