From d57cec228515287321089ba06f54b8de3e25ebf6 Mon Sep 17 00:00:00 2001 From: lerosua Date: Fri, 16 May 2014 23:59:28 +0800 Subject: [PATCH 01/10] fix podspec --- ZBarSDK.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ZBarSDK.podspec b/ZBarSDK.podspec index f0e9be8d..ebd8b1b3 100644 --- a/ZBarSDK.podspec +++ b/ZBarSDK.podspec @@ -6,7 +6,7 @@ Pod::Spec.new do |s| s.summary = 'QR and barcode scan library.' s.homepage = 'http://zbar.sourceforge.net/' s.author = { 'Jeff Brown' => 'spadix@users.sourceforge.net' } - s.source = { :git => 'https://github.com/cduhn/ZBar.git', :tag => 'iPhoneSDK-1.3.1' } + s.source = { :git => 'https://github.com/lerosua/ZBar.git' } s.description = 'ZBar is an open source software suite for reading bar codes from various sources, such as video streams, ' \ 'image files and raw intensity sensors. It supports many popular symbologies (types of bar codes) including ' \ @@ -33,4 +33,4 @@ Pod::Spec.new do |s| s.prefix_header_file = 'iphone/include/prefix.pch' s.compiler_flags = '-w' -end \ No newline at end of file +end From 258d3db0433b1a48d800a4184f7086296377a6a5 Mon Sep 17 00:00:00 2001 From: lerosua Date: Sat, 17 May 2014 00:26:43 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=8F=98=E9=87=8F=E7=9A=84=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zbar/decoder/code93.c | 1 + zbar/error.c | 1 + zbar/image.c | 1 + zbar/img_scanner.c | 1 + 4 files changed, 4 insertions(+) diff --git a/zbar/decoder/code93.c b/zbar/decoder/code93.c index 43b8ed79..46634863 100644 --- a/zbar/decoder/code93.c +++ b/zbar/decoder/code93.c @@ -158,6 +158,7 @@ decode_start (zbar_decoder_t *dcode) if(dir) { if(decode_e(pair_width(dcode, 0), s, 9)) return(ZBAR_NONE); +#pragma unused(qz) qz = get_width(dcode, 8); } diff --git a/zbar/error.c b/zbar/error.c index 27b0a82c..05e65ac6 100644 --- a/zbar/error.c +++ b/zbar/error.c @@ -175,6 +175,7 @@ const char *_zbar_error_string (const void *container, #endif else { err->buf = realloc(err->buf, len + 2); +#pragma unused(len) len += sprintf(err->buf + len, "\n"); } return(err->buf); diff --git a/zbar/image.c b/zbar/image.c index 359c8379..076e7054 100644 --- a/zbar/image.c +++ b/zbar/image.c @@ -247,6 +247,7 @@ int zbar_image_write (const zbar_image_t *img, FILE *f; zimg_hdr_t hdr; strcpy(filename, filebase); +#pragma unused(n) if((img->format & 0xff) >= ' ') n = snprintf(filename, len, "%s.%.4s.zimg", filebase, (char*)&img->format); diff --git a/zbar/img_scanner.c b/zbar/img_scanner.c index 32e03d93..13fe0126 100644 --- a/zbar/img_scanner.c +++ b/zbar/img_scanner.c @@ -678,6 +678,7 @@ int zbar_scan_image (zbar_image_scanner_t *iscn, img->syms = syms; w = img->width; +#pragma unused(h) h = img->height; cx1 = img->crop_x + img->crop_w; assert(cx1 <= w); From 6929c535a5c6648b8071a9472adef4294bc54bc5 Mon Sep 17 00:00:00 2001 From: lerosua Date: Sat, 17 May 2014 10:15:52 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=97=A0=E5=88=9D=E5=A7=8B=E5=8C=96=E9=80=A0=E6=88=90=E7=9A=84?= =?UTF-8?q?=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zbar/decoder/databar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zbar/decoder/databar.c b/zbar/decoder/databar.c index 8cfa8486..3e68dccd 100644 --- a/zbar/decoder/databar.c +++ b/zbar/decoder/databar.c @@ -710,7 +710,7 @@ match_segment_exp (zbar_decoder_t *dcode, databar_decoder_t *db = &dcode->databar; int bestsegs[22], i = 0, segs[22], seq[22]; int ifixed = seg - db->segs, fixed = IDX(seg), maxcnt = 0; - int iseg[DATABAR_MAX_SEGMENTS]; + int iseg[DATABAR_MAX_SEGMENTS]={0}; unsigned csegs = db->csegs, width = seg->width, maxage = 0x7fff; bestsegs[0] = segs[0] = seq[1] = -1; From 17b1b2557d153d567f2664b6cd81de3ba5d79d5b Mon Sep 17 00:00:00 2001 From: lerosua Date: Sat, 17 May 2014 10:15:52 +0800 Subject: [PATCH 04/10] fix warning with garbage value --- zbar/decoder/databar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zbar/decoder/databar.c b/zbar/decoder/databar.c index 8cfa8486..3e68dccd 100644 --- a/zbar/decoder/databar.c +++ b/zbar/decoder/databar.c @@ -710,7 +710,7 @@ match_segment_exp (zbar_decoder_t *dcode, databar_decoder_t *db = &dcode->databar; int bestsegs[22], i = 0, segs[22], seq[22]; int ifixed = seg - db->segs, fixed = IDX(seg), maxcnt = 0; - int iseg[DATABAR_MAX_SEGMENTS]; + int iseg[DATABAR_MAX_SEGMENTS]={0}; unsigned csegs = db->csegs, width = seg->width, maxage = 0x7fff; bestsegs[0] = segs[0] = seq[1] = -1; From ec6fa56dab99f46f69377104c3cb1099d97e013c Mon Sep 17 00:00:00 2001 From: lerosua Date: Sat, 17 May 2014 10:45:31 +0800 Subject: [PATCH 05/10] fix podspec to fixwarning tag --- ZBarSDK.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ZBarSDK.podspec b/ZBarSDK.podspec index ebd8b1b3..3acc487f 100644 --- a/ZBarSDK.podspec +++ b/ZBarSDK.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| - s.name = 'ZBarSDK' + s.name = 'ZBarSDK-fixWarning' s.version = '1.3.1' s.platform = :ios s.license = 'GNU LGPL 2.1' s.summary = 'QR and barcode scan library.' s.homepage = 'http://zbar.sourceforge.net/' s.author = { 'Jeff Brown' => 'spadix@users.sourceforge.net' } - s.source = { :git => 'https://github.com/lerosua/ZBar.git' } + s.source = { :git => 'https://github.com/lerosua/ZBar.git', :tag =>"fixWarning-1.3.1" } s.description = 'ZBar is an open source software suite for reading bar codes from various sources, such as video streams, ' \ 'image files and raw intensity sensors. It supports many popular symbologies (types of bar codes) including ' \ From 235dd718b2c652ac097fc09a22cea1a37619f919 Mon Sep 17 00:00:00 2001 From: lerosua Date: Sat, 17 May 2014 10:47:31 +0800 Subject: [PATCH 06/10] rename the podspec name --- ZBarSDK.podspec | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 ZBarSDK.podspec diff --git a/ZBarSDK.podspec b/ZBarSDK.podspec deleted file mode 100644 index 3acc487f..00000000 --- a/ZBarSDK.podspec +++ /dev/null @@ -1,36 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'ZBarSDK-fixWarning' - s.version = '1.3.1' - s.platform = :ios - s.license = 'GNU LGPL 2.1' - s.summary = 'QR and barcode scan library.' - s.homepage = 'http://zbar.sourceforge.net/' - s.author = { 'Jeff Brown' => 'spadix@users.sourceforge.net' } - s.source = { :git => 'https://github.com/lerosua/ZBar.git', :tag =>"fixWarning-1.3.1" } - - s.description = 'ZBar is an open source software suite for reading bar codes from various sources, such as video streams, ' \ - 'image files and raw intensity sensors. It supports many popular symbologies (types of bar codes) including ' \ - 'EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code.' - - s.public_header_files = 'iphone/**/**/*.h', 'include/*.h' - - s.source_files = 'include/zbar.h', 'zbar/**/*.h', 'iphone/*.h', 'iphone/include/**/*.h', - 'zbar/{config,decoder,error,image,img_scanner,refcnt,scanner,symbol}.c', - 'zbar/decoder/{codabar,code39,code93,code128,databar,ean,i25,qr_finder}.c', - 'zbar/qrcode/*.c', - 'iphone/*.m' - - s.resources = 'iphone/res/{zbar-*.png,zbar-help.html}' - - s.frameworks = 'AVFoundation', 'CoreGraphics', 'CoreMedia', 'CoreVideo', 'QuartzCore' - - s.library = 'iconv' - - s.xcconfig = { "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*][arch=*]" => 'ZBarReaderViewImpl_Simulator.m', - "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*][arch=*]" => 'ZBarReaderViewImpl_Capture.m ZBarCaptureReader.m', - "GCC_PREPROCESSOR_DEFINITIONS" => 'NDEBUG=1' } - - s.prefix_header_file = 'iphone/include/prefix.pch' - - s.compiler_flags = '-w' -end From 24c17e2e20002c41a8b0320787cd46ca3e5f6e7e Mon Sep 17 00:00:00 2001 From: lerosua Date: Sat, 17 May 2014 10:49:48 +0800 Subject: [PATCH 07/10] fix --- ZBarSDK-fixWarning.podspec | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 ZBarSDK-fixWarning.podspec diff --git a/ZBarSDK-fixWarning.podspec b/ZBarSDK-fixWarning.podspec new file mode 100644 index 00000000..3acc487f --- /dev/null +++ b/ZBarSDK-fixWarning.podspec @@ -0,0 +1,36 @@ +Pod::Spec.new do |s| + s.name = 'ZBarSDK-fixWarning' + s.version = '1.3.1' + s.platform = :ios + s.license = 'GNU LGPL 2.1' + s.summary = 'QR and barcode scan library.' + s.homepage = 'http://zbar.sourceforge.net/' + s.author = { 'Jeff Brown' => 'spadix@users.sourceforge.net' } + s.source = { :git => 'https://github.com/lerosua/ZBar.git', :tag =>"fixWarning-1.3.1" } + + s.description = 'ZBar is an open source software suite for reading bar codes from various sources, such as video streams, ' \ + 'image files and raw intensity sensors. It supports many popular symbologies (types of bar codes) including ' \ + 'EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code.' + + s.public_header_files = 'iphone/**/**/*.h', 'include/*.h' + + s.source_files = 'include/zbar.h', 'zbar/**/*.h', 'iphone/*.h', 'iphone/include/**/*.h', + 'zbar/{config,decoder,error,image,img_scanner,refcnt,scanner,symbol}.c', + 'zbar/decoder/{codabar,code39,code93,code128,databar,ean,i25,qr_finder}.c', + 'zbar/qrcode/*.c', + 'iphone/*.m' + + s.resources = 'iphone/res/{zbar-*.png,zbar-help.html}' + + s.frameworks = 'AVFoundation', 'CoreGraphics', 'CoreMedia', 'CoreVideo', 'QuartzCore' + + s.library = 'iconv' + + s.xcconfig = { "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*][arch=*]" => 'ZBarReaderViewImpl_Simulator.m', + "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*][arch=*]" => 'ZBarReaderViewImpl_Capture.m ZBarCaptureReader.m', + "GCC_PREPROCESSOR_DEFINITIONS" => 'NDEBUG=1' } + + s.prefix_header_file = 'iphone/include/prefix.pch' + + s.compiler_flags = '-w' +end From 52698f17989a29e259e33892a95baaa0d42c3a7e Mon Sep 17 00:00:00 2001 From: lerosua Date: Sat, 17 May 2014 11:23:11 +0800 Subject: [PATCH 08/10] fix --- ZBarSDK-fixWarning.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZBarSDK-fixWarning.podspec b/ZBarSDK-fixWarning.podspec index 3acc487f..80729c16 100644 --- a/ZBarSDK-fixWarning.podspec +++ b/ZBarSDK-fixWarning.podspec @@ -6,7 +6,7 @@ Pod::Spec.new do |s| s.summary = 'QR and barcode scan library.' s.homepage = 'http://zbar.sourceforge.net/' s.author = { 'Jeff Brown' => 'spadix@users.sourceforge.net' } - s.source = { :git => 'https://github.com/lerosua/ZBar.git', :tag =>"fixWarning-1.3.1" } + s.source = { :git => 'https://github.com/lerosua/ZBarSDK-fixWarning.git', :tag =>"fixWarning-1.3.1" } s.description = 'ZBar is an open source software suite for reading bar codes from various sources, such as video streams, ' \ 'image files and raw intensity sensors. It supports many popular symbologies (types of bar codes) including ' \ From cd30ac0a69c6629f202667b3487794569002d0e9 Mon Sep 17 00:00:00 2001 From: lerosua Date: Sat, 17 May 2014 11:36:12 +0800 Subject: [PATCH 09/10] fix again --- ZBarSDK-fixWarning.podspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ZBarSDK-fixWarning.podspec b/ZBarSDK-fixWarning.podspec index 80729c16..1f6538d6 100644 --- a/ZBarSDK-fixWarning.podspec +++ b/ZBarSDK-fixWarning.podspec @@ -6,7 +6,7 @@ Pod::Spec.new do |s| s.summary = 'QR and barcode scan library.' s.homepage = 'http://zbar.sourceforge.net/' s.author = { 'Jeff Brown' => 'spadix@users.sourceforge.net' } - s.source = { :git => 'https://github.com/lerosua/ZBarSDK-fixWarning.git', :tag =>"fixWarning-1.3.1" } + s.source = { :git => 'https://github.com/lerosua/ZBarSDK.git', :tag =>"fixWarning-1.3.1" } s.description = 'ZBar is an open source software suite for reading bar codes from various sources, such as video streams, ' \ 'image files and raw intensity sensors. It supports many popular symbologies (types of bar codes) including ' \ @@ -25,6 +25,7 @@ Pod::Spec.new do |s| s.frameworks = 'AVFoundation', 'CoreGraphics', 'CoreMedia', 'CoreVideo', 'QuartzCore' s.library = 'iconv' + s.requires_arc = false s.xcconfig = { "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*][arch=*]" => 'ZBarReaderViewImpl_Simulator.m', "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*][arch=*]" => 'ZBarReaderViewImpl_Capture.m ZBarCaptureReader.m', From d1a32b7bd1e43328534d0984c666debec7064b9e Mon Sep 17 00:00:00 2001 From: lerosua Date: Sat, 17 May 2014 12:08:57 +0800 Subject: [PATCH 10/10] mv name ZBarSDK.podspec --- ZBarSDK-fixWarning.podspec => ZBarSDK.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename ZBarSDK-fixWarning.podspec => ZBarSDK.podspec (97%) diff --git a/ZBarSDK-fixWarning.podspec b/ZBarSDK.podspec similarity index 97% rename from ZBarSDK-fixWarning.podspec rename to ZBarSDK.podspec index 1f6538d6..a8e5ae54 100644 --- a/ZBarSDK-fixWarning.podspec +++ b/ZBarSDK.podspec @@ -1,5 +1,5 @@ Pod::Spec.new do |s| - s.name = 'ZBarSDK-fixWarning' + s.name = 'ZBarSDK' s.version = '1.3.1' s.platform = :ios s.license = 'GNU LGPL 2.1'