Wykres commitów

12375 Commity (aa032f458d9bf6a30209ff8cca7d36c475f9a480)

Autor SHA1 Wiadomość Data
David Ward 1277612c5b avision: Cancel scanning before closing device 2022-03-27 16:51:30 -04:00
David Ward bd6ad2e092 avision: Correctly handle failure to open file 2022-03-27 16:51:30 -04:00
Ralph Little c1c77436f4 Merge branch '578-remove-linux-kernel-driver-for-plustek_pp-backend' into 'master'
Resolve "Remove Linux kernel driver for plustek_pp backend"

Closes #578

See merge request sane-project/backends!708
2022-03-25 03:49:57 +00:00
Ralph Little 3513af029e plustek-pp: Removed module build files from dist make rules. 2022-03-23 13:26:53 -07:00
Ralph Little 27a7c4518e plustek-pp: removed conditionally compiled code for Linux driver.
Mainly consists of removing code for #ifdef __KERNEL__
In order to keep it really clear what code has been removed, I have
not corrected any formatting issues.
2022-03-23 13:15:27 -07:00
Povilas Kanapickas e87bd848df Merge branch 'merge-release-1.1.x' into 'master'
Merge release-1.1.x branch to master.

See merge request sane-project/backends!709
2022-03-21 20:41:50 +00:00
Povilas Kanapickas aba8c30c92 Merge branch 'release-1.1.x' into merge-release-1.1.x 2022-03-21 22:26:33 +02:00
David Ward 60209994a1 CI: Temporarily allow build job failures
Specify -Werror in both CFLAGS and CXXFLAGS for all build jobs.

For the updated build targets, temporarily allow the build job to fail
while outstanding issues that cause compiler warnings are being fixed.
2022-03-19 19:10:40 -04:00
David Ward 6a14383e84 CI: Bump all distributions to stable versions
Use Alpine 3.15.0; Debian 10.11 and 11.2; Fedora 35; and Ubuntu 20.04.
2022-03-19 19:06:18 -04:00
Ralph Little 6054620c69 Merge branch '583-samsung-scx-4824fn-support' into 'master'
Resolve "Samsung SCX-4824FN Support"

Closes #583

See merge request sane-project/backends!707
2022-03-19 16:20:34 +00:00
Ralph Little ad08e768be Merge branch 'resolve-compiler-warnings' into 'master'
Resolve compiler warnings (including fixes for actual bugs)

See merge request sane-project/backends!701
2022-03-19 16:19:54 +00:00
Ralph Little 3635176eb9 plustek_pp: Removed references to the kernel driver from doc. 2022-03-15 18:57:51 -07:00
Ralph Little 2cf41870b9 xerox_mfp: added fix for Samsung SCX-4824FN and friends for broken JPEg support 2022-03-14 16:35:19 -07:00
Ralph Little 95e2498fe9 Merge branch 'canon_pp-weights-file' into 'master'
canon_pp: Avoid buffer overflow if pathname exceeds PATH_MAX

See merge request sane-project/backends!702
2022-03-14 00:25:02 +00:00
Ralph Little 7cdd2ad268 Merge branch '580-canoscan-lide-220-aborts-before-end-of-4800dpi-colour-scan' into 'master'
Resolve "Canoscan LiDE 220 aborts before end of 4800dpi colour scan"

Closes #580

See merge request sane-project/backends!697
2022-03-10 01:31:01 +00:00
Ralph Little 2d49a2af65 Merge branch 'pixma-fix-max-resolution' into 'master'
pixma:Fix max resolution

See merge request sane-project/backends!703
2022-03-10 01:29:59 +00:00
Ordissimo e5ff5d06e5 pixma:Fix max resolution 2022-03-10 01:29:59 +00:00
thierry1970 356f1c9b27 pixma:Add TS3400. 2022-03-09 09:02:41 +01:00
Ralph Little 84e907f87c Merge branch 'resolve-sane-desc-warnings' into 'master'
descriptions: Resolve multiple warnings from sane-desc

See merge request sane-project/backends!698
2022-03-09 03:51:08 +00:00
David Ward ff4114a795 kvs40xx: Return NULL from read_data()
Functions called by pthread_create() have the return type (void *).
However, the return statements in read_data() use a value of type
SANE_Status rather than a pointer, which causes a compiler warning.

This return value is never actually used, so return NULL instead.
2022-03-08 19:00:00 -05:00
David Ward 9cd0b1809c lexmark_low: Adjust calculation of bytes available in read buffer
GCC warns that an unsigned value is passed to abs(), which may not be
intended. To resolve this warning, adjust the code so abs() is not used
and the behavior is more explicit.
2022-03-08 19:00:00 -05:00
David Ward 0c70fd560c canon_pp: Avoid buffer overflow if pathname exceeds PATH_MAX
If the weights file pathname is longer than PATH_MAX, it may be written
past the end of the buffer on the stack; or it may be truncated when it
is written to allocated memory (such that it is not null-terminated).

Adjust the code to fix both issues. Dynamically allocate memory for the
actual length of the pathname so that it is not constrained by PATH_MAX.
2022-03-08 19:00:00 -05:00
David Ward 2efdd5a334 plustek: Adjust gain calculation to avoid calling labs()
labs() has a signed parameter. However the argument to it here was the
difference between two unsigned values, which itself remains unsigned.
GCC warned that using this in labs() might not have the intended result.

By definition though, dwInc >= m_dwIdealGain >= dwDec, so labs() is not
even needed in this expression.
2022-03-08 19:00:00 -05:00
David Ward 5576d03afd genesys: Fix forward declaration for type UsbDeviceEntry
This did not match the definition, causing a compiler warning.
2022-03-08 19:00:00 -05:00
David Ward 6048724f22 coolscan2, coolscan3: Fix initialization of enum members in struct
GCC warns when setting an enum member to 0 without an explicit cast.
Use the corresponding value in the enum type instead.
2022-03-08 19:00:00 -05:00
David Ward 47fd7538bc Remove set but unused variables which cause compiler warnings 2022-03-08 19:00:00 -05:00
David Ward a82a312d85 Remove unused functions which cause compiler warnings 2022-03-08 19:00:00 -05:00
David Ward 0d032cd982 Remove useless conditionals which cause compiler warnings
These always evaluate to true in the context of the surrounding code.
2022-03-08 19:00:00 -05:00
David Ward b3d105cba5 Use snprintf() instead of strncpy() for space-padded strings
The output from the SCSI inquiry command uses fixed-length space-padded
strings, which are copied into null-terminated strings before use.

This is currently done using strncpy(), with the count parameter set to
the string's fixed length. Because a null terminator is not encountered
in the input, strncpy() does not write one in the output, and GCC warns
about potential string truncation. A null terminator is added manually,
but this is error prone (as shown by the fix for the microtek backend).

Use snprintf() instead, which guarantees a null-terminated result and
resolves the warnings from GCC.
2022-03-08 19:00:00 -05:00
David Ward 6a16e78788 Use strdup()/strndup() instead of direct allocation and string copy
Otherwise, GCC warns about possible string truncation. This simplifies
the code here as well.
2022-03-08 19:00:00 -05:00
David Ward 3c3a247d25 Replace deprecated uint32 with uint32_t 2022-03-08 19:00:00 -05:00
David Ward db573b74ed Fix format specifiers to match arguments' data types 2022-03-08 19:00:00 -05:00
David Ward 1a933bba7e Cast pointer arguments if needed when using "%p" format specifier
Pointer arguments must have type (void *) when printed with the format
specifier "%p".
2022-03-08 19:00:00 -05:00
David Ward f3162bafa8 Replace variable self-assignments to avoid Clang warnings
These were intended to suppress GCC warnings about unused variables.
However, this leads to different warnings from Clang instead.

Use another approach that suppresses warnings from both compilers.
2022-03-08 19:00:00 -05:00
David Ward 6be83f469b Resolve compiler warnings about misleading indentation
This change is targeted at specific lines of code reported by GCC or
Clang as potentially causing unintended behavior.
2022-03-08 19:00:00 -05:00
David Ward 6cc15e2b81 Adjust conditional expressions to resolve compiler warnings 2022-03-08 19:00:00 -05:00
David Ward 2955089cd9 Fix conditional expressions with unintended behavior 2022-03-08 19:00:00 -05:00
David Ward 1458d23c42 umax: Fix unintended string concatenation in array definition
This causes the wrong error message to be used in the log.
2022-03-08 19:00:00 -05:00
David Ward bfa69c26e6 snapscan: Fix debug logging in sense_handler()
Remove an extraneous log message.

Ensure that a separate log message is only printed when the preceding
if-statement is true (and its string argument has actually been set).

Both issues were identified from GCC warnings about indentation.
2022-03-08 19:00:00 -05:00
David Ward 23addf5590 sm3840: Fix argument types for variadic function
Values of type unsigned char are automatically promoted to a larger
integer type, so they cannot be used as variadic function arguments.
2022-03-08 19:00:00 -05:00
David Ward 4cf3b09e49 rts8822, rts8891: Replace abs() with fabs() where needed
abs() has an integer parameter and returns an integer value. Floating-
point values should be passed to fabs() instead.

In particular, this affected calculations for gain and offset, where a
value with floating-point precision is clearly expected.
2022-03-08 19:00:00 -05:00
David Ward e859ea4d89 pieusb: Add missing calls to sanei_pieusb_convert_status()
Fix cases where values of type PIEUSB_Status were used or returned when
the expected type was SANE_Status.
2022-03-08 19:00:00 -05:00
David Ward f8785fb6a8 mustek_pp: Handle status argument correctly in pa4s2_init()
Currently the pointer itself is overwritten, when it is intended that
the pointer be derefenced first.
2022-03-08 19:00:00 -05:00
David Ward f651d6f098 microtek: Fix null termination of string, and adjust buffer lengths
The Product Revision Level field in the SCSI inquiry data has a fixed
length of 4 bytes. When copying it as a null-terminated string, place
the null terminator in the correct position; currently the string has
an extra character that is never initialized in memory.

Reduce the length of each string buffer, so it does not extend beyond
the null terminator.
2022-03-08 19:00:00 -05:00
Ordissimo 9cd8f475eb Merge branch 'escl-add-canon-ts-3400-series' into 'master'
escl: Add canon TS-3400 series

See merge request sane-project/backends!700
2022-03-08 08:59:43 +00:00
Ordissimo 84a39145e4 escl: Add canon TS-3400 series 2022-03-08 08:59:43 +00:00
David Ward a519a3529a mustek_usb2: Replace STATUS type with SANE_Status
In some cases, a return value with type SANE_Status was assigned to a
variable with type STATUS. It is easiest to remove the redundant type
here.
2022-03-02 21:16:47 -05:00
David Ward e1a319e729 descriptions: Resolve multiple warnings from sane-desc
Fix the USB VID/PID in device descriptions to use lowercase hex digits.
Remove an extraneous description, having no name or USB VID, from the
epsonds file. Remove an extraneous interface in the description for the
Brother MFC-J1300DW.

Additionally, fix mispellings of "Flatbed" and "WiFi".
2022-03-02 21:16:33 -05:00
Ralph Little 41866df6e1 genesys: fix for computation of total file size exceeding unsigned
Large scans that exceed 32-bits need cast to allow 64-bit size.
2022-02-27 18:55:26 -08:00
Ralph Little 4091619e07 Merge branch '577-add-plustek' into 'master'
Resolve "Issues making on osx"

Closes #577

See merge request sane-project/backends!696
2022-02-25 02:31:18 +00:00