Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: resolve 32 bit compilation failure #603

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

javacruft
Copy link

Ensure same type comparison (size_t) on 32 bit architectures,
resolving compilation failure:

In file included from /<<PKGBUILDDIR>>/libtcmu.h:24,
                 from /<<PKGBUILDDIR>>/tcmur_cmd_handler.c:20:
/<<PKGBUILDDIR>>/tcmur_cmd_handler.c: In function ‘handle_writesame’:
/<<PKGBUILDDIR>>/libtcmu_common.h:82:14: error: comparison of distinct pointer types lacks a cast [-Werror]
   82 |  (void) (&_a == &_b);  \
      |              ^~
/<<PKGBUILDDIR>>/tcmur_cmd_handler.c:728:11: note: in expansion of macro ‘min’
  728 |  length = min(length, tcmu_lba_to_byte(dev, lba_cnt));
      |

when "-Werror" is enabled by the compiler.

Ensure same type comparison (size_t) on 32 bit architectures,
resolving compilation failure:

In file included from /<<PKGBUILDDIR>>/libtcmu.h:24,
                 from /<<PKGBUILDDIR>>/tcmur_cmd_handler.c:20:
/<<PKGBUILDDIR>>/tcmur_cmd_handler.c: In function ‘handle_writesame’:
/<<PKGBUILDDIR>>/libtcmu_common.h:82:14: error: comparison of distinct pointer types lacks a cast [-Werror]
   82 |  (void) (&_a == &_b);  \
      |              ^~
/<<PKGBUILDDIR>>/tcmur_cmd_handler.c:728:11: note: in expansion of macro ‘min’
  728 |  length = min(length, tcmu_lba_to_byte(dev, lba_cnt));
      |

when "-Werror" is enabled by the compiler.
@JuniorJPDJ JuniorJPDJ mentioned this pull request Jul 7, 2021
@lxbsz lxbsz changed the base branch from master to main August 10, 2022 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant