rpms/jhead/devel jhead-compiler-warnings.patch, NONE, 1.1 jhead.spec, 1.10, 1.11
Adrian Reber (adrian)
fedora-extras-commits at redhat.com
Fri Jul 8 19:37:16 UTC 2005
Author: adrian
Update of /cvs/extras/rpms/jhead/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7896
Modified Files:
jhead.spec
Added Files:
jhead-compiler-warnings.patch
Log Message:
* Fri Jul 08 2005 Adrian Reber <adrian at lisas.de> - 2.4-2
- added patch to make compiler happy
jhead-compiler-warnings.patch:
--- NEW FILE jhead-compiler-warnings.patch ---
diff -ur jhead-2.4/exif.c jhead-2.4.new/exif.c
--- jhead-2.4/exif.c 2005-06-10 15:39:56.000000000 +0200
+++ jhead-2.4.new/exif.c 2005-07-08 19:37:52.000000000 +0200
@@ -395,7 +395,7 @@
unsigned char * ValuePtr;
int ByteCount;
char * DirEntry;
- DirEntry = DIR_ENTRY_ADDR(DirStart, de);
+ DirEntry = (char *)DIR_ENTRY_ADDR(DirStart, de);
Tag = Get16u(DirEntry);
Format = Get16u(DirEntry+2);
@@ -421,7 +421,7 @@
ValuePtr = OffsetBase+OffsetVal;
}else{
// 4 bytes or less and value is in the dir entry itself
- ValuePtr = DirEntry+8;
+ ValuePtr = (unsigned char *)DirEntry+8;
}
if (LastExifRefd < ValuePtr+ByteCount){
@@ -493,17 +493,17 @@
switch(Tag){
case TAG_MAKE:
- strncpy(ImageInfo.CameraMake, ValuePtr, 31);
+ strncpy(ImageInfo.CameraMake, (char *)ValuePtr, 31);
break;
case TAG_MODEL:
- strncpy(ImageInfo.CameraModel, ValuePtr, 39);
+ strncpy(ImageInfo.CameraModel, (char *)ValuePtr, 39);
break;
case TAG_DATETIME_ORIGINAL:
// If we get a DATETIME_ORIGINAL, we use that one.
- strncpy(ImageInfo.DateTime, ValuePtr, 19);
+ strncpy(ImageInfo.DateTime, (char *)ValuePtr, 19);
// Fallthru...
case TAG_DATETIME_DIGITIZED:
@@ -511,14 +511,14 @@
if (!isdigit(ImageInfo.DateTime[0])){
// If we don't already have a DATETIME_ORIGINAL, use whatever
// time fields we may have.
- strncpy(ImageInfo.DateTime, ValuePtr, 19);
+ strncpy(ImageInfo.DateTime, (char *)ValuePtr, 19);
}
if (ImageInfo.numDateTimeTags >= MAX_DATE_COPIES){
ErrNonfatal("More than %d date fields! This is nuts", MAX_DATE_COPIES, 0);
break;
}
- ImageInfo.DateTimePointers[ImageInfo.numDateTimeTags++] = ValuePtr;
+ ImageInfo.DateTimePointers[ImageInfo.numDateTimeTags++] = (char *)ValuePtr;
break;
@@ -540,13 +540,13 @@
int c;
c = (ValuePtr)[a];
if (c != '\0' && c != ' '){
- strncpy(ImageInfo.Comments, a+ValuePtr, 199);
+ strncpy(ImageInfo.Comments, (char *)(a+ValuePtr), 199);
break;
}
}
}else{
- strncpy(ImageInfo.Comments, ValuePtr, 199);
+ strncpy(ImageInfo.Comments, (char *)ValuePtr, 199);
}
break;
@@ -927,7 +927,7 @@
for (de=0;de<NumDirEntries;de++){
int Tag;
char * DirEntry;
- DirEntry = DIR_ENTRY_ADDR(DirWithThumbnailPtrs, de);
+ DirEntry = (char *)DIR_ENTRY_ADDR(DirWithThumbnailPtrs, de);
Tag = Get16u(DirEntry);
if (Tag == TAG_THUMBNAIL_OFFSET || Tag == TAG_THUMBNAIL_LENGTH){
// We remove data out of the exif directory by doing a memmove on the rest
diff -ur jhead-2.4/gpsinfo.c jhead-2.4.new/gpsinfo.c
--- jhead-2.4/gpsinfo.c 2005-06-10 15:39:56.000000000 +0200
+++ jhead-2.4.new/gpsinfo.c 2005-07-08 19:40:27.000000000 +0200
@@ -84,7 +84,7 @@
int ComponentSize;
unsigned ByteCount;
char * DirEntry;
- DirEntry = DIR_ENTRY_ADDR(DirStart, de);
+ DirEntry = (char *)DIR_ENTRY_ADDR(DirStart, de);
Tag = Get16u(DirEntry);
Format = Get16u(DirEntry+2);
@@ -111,7 +111,7 @@
ValuePtr = OffsetBase+OffsetVal;
}else{
// 4 bytes or less and value is in the dir entry itself
- ValuePtr = DirEntry+8;
+ ValuePtr = (unsigned char *)DirEntry+8;
}
switch(Tag){
diff -ur jhead-2.4/jpgfile.c jhead-2.4.new/jpgfile.c
--- jhead-2.4/jpgfile.c 2005-06-10 15:39:56.000000000 +0200
+++ jhead-2.4.new/jpgfile.c 2005-07-08 19:32:37.000000000 +0200
@@ -245,7 +245,7 @@
// that uses marker 31 for non exif stuff. Thus make sure
// it says 'Exif' in the section before treating it as exif.
if ((ReadMode & READ_EXIF) && memcmp(Data+2, "Exif", 4) == 0){
- process_EXIF((char *)Data, itemlen);
+ process_EXIF((unsigned char *)Data, itemlen);
}else{
// Discard this section.
free(Sections[--SectionsRead].Data);
diff -ur jhead-2.4/makefile jhead-2.4.new/makefile
--- jhead-2.4/makefile 2005-07-08 19:49:51.000000000 +0200
+++ jhead-2.4.new/makefile 2005-06-10 15:39:56.000000000 +0200
@@ -9,7 +9,7 @@
objs = $(OBJ)/jhead.o $(OBJ)/jpgfile.o $(OBJ)/exif.o $(OBJ)/gpsinfo.o $(OBJ)/makernote.o
$(OBJ)/%.o:$(SRC)/%.c
- ${CC} ${CFLAGS} -Wall -c $< -o $@
+ ${CC} -O3 -Wall -c $< -o $@
jhead: $(objs) jhead.h
${CC} -o jhead $(objs) -lm
diff -ur jhead-2.4/makernote.c jhead-2.4.new/makernote.c
--- jhead-2.4/makernote.c 2005-06-10 15:39:56.000000000 +0200
+++ jhead-2.4.new/makernote.c 2005-07-08 19:41:00.000000000 +0200
@@ -48,7 +48,7 @@
unsigned char * ValuePtr;
int ByteCount;
char * DirEntry;
- DirEntry = DIR_ENTRY_ADDR(DirStart, de);
+ DirEntry = (char *)DIR_ENTRY_ADDR(DirStart, de);
Tag = Get16u(DirEntry);
Format = Get16u(DirEntry+2);
@@ -74,7 +74,7 @@
ValuePtr = OffsetBase+OffsetVal;
}else{
// 4 bytes or less and value is in the dir entry itself
- ValuePtr = DirEntry+8;
+ ValuePtr = (unsigned char *)DirEntry+8;
}
if (ShowTags){
Index: jhead.spec
===================================================================
RCS file: /cvs/extras/rpms/jhead/devel/jhead.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- jhead.spec 8 Jul 2005 17:30:05 -0000 1.10
+++ jhead.spec 8 Jul 2005 19:37:14 -0000 1.11
@@ -1,12 +1,13 @@
Name: jhead
Version: 2.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Tool for displaying EXIF data embedded in JPEG images
Group: Applications/Multimedia
License: Public Domain
URL: http://www.sentex.net/~mwandel/jhead/
Source0: http://www.sentex.net/~mwandel/jhead/jhead-2.4.tar.gz
Patch0: jhead-makefile.patch
+Patch1: jhead-compiler-warnings.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
@@ -16,6 +17,7 @@
%prep
%setup -q
%patch0
+%patch1 -p1
%build
CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags}
@@ -37,6 +39,9 @@
%{_mandir}/man?/*
%changelog
+* Fri Jul 08 2005 Adrian Reber <adrian at lisas.de> - 2.4-2
+- added patch to make compiler happy
+
* Fri Jul 08 2005 Adrian Reber <adrian at lisas.de> - 2.4-1
- updated to 2.4
More information about the fedora-extras-commits
mailing list