summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
74fbc97)
Compilers may warn about missing fields in initializers when more checks
are enabled with STRICT_COMPILATION_CHECKS=ON:
.../src/am7xxx.c:1131:31: error: missing field 'direction' initializer [-Werror,-Wmissing-field-initializers]
struct am7xxx_header h = { 0 };
^
1 error generated.
am7xxx_device_info *device_info)
{
int ret;
am7xxx_device_info *device_info)
{
int ret;
- struct am7xxx_header h = { 0 };
+ struct am7xxx_header h;
if (dev->device_info) {
memcpy(device_info, dev->device_info, sizeof(*device_info));
if (dev->device_info) {
memcpy(device_info, dev->device_info, sizeof(*device_info));
+ memset(&h, 0, sizeof(h));
ret = read_header(dev, &h);
if (ret < 0)
return ret;
ret = read_header(dev, &h);
if (ret < 0)
return ret;