Bug 1336513 - changelog: compiler warning format string
Summary: changelog: compiler warning format string
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: GlusterFS
Classification: Community
Component: changelog
Version: mainline
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Sheetal Pamecha
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-16 16:59 UTC by Kaleb KEITHLEY
Modified: 2019-07-16 13:26 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-07-16 13:26:41 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Kaleb KEITHLEY 2016-05-16 16:59:03 UTC
Description of problem:

Making all in lib
Making all in src
  CC       libgfchangelog_la-gf-changelog-journal-handler.lo
  CC       libgfchangelog_la-gf-changelog.lo
  CC       libgfchangelog_la-gf-changelog-helpers.lo
  CC       libgfchangelog_la-gf-changelog-api.lo
  CC       libgfchangelog_la-gf-history-changelog.lo
  CC       libgfchangelog_la-gf-changelog-rpc.lo
  CC       libgfchangelog_la-gf-changelog-reborp.lo
  CC       libgfchangelog_la-changelog-rpc-common.lo
In file included from ../../../../../libglusterfs/src/glusterfs.h:35:0,
                 from ../../../../../xlators/features/changelog/src/changelog-misc.h:14,
                 from gf-changelog-reborp.c:11:
gf-changelog-reborp.c: In function 'gf_changelog_event_handler':
gf-changelog-reborp.c:365:23: warning: format '%ld' expects argument of type 'long int', but argument 15 has type 'size_t {aka unsigned int}' [-Wformat=]
                       "seq: %lu [%s] (time: %lu.%lu), (vec: %d, len: %ld)",
                       ^
../../../../../libglusterfs/src/logging.h:248:55: note: in definition of macro 'gf_msg_debug'
                         GF_LOG_DEBUG, errnum, 0, 0, ##fmt);             \
                                                       ^~~
  CCLD     libgfchangelog.la





Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Yaniv Kaul 2019-04-17 09:59:15 UTC
ykaul@ykaul src]$ make
  CC       libgfchangelog_la-gf-changelog.lo
  CC       libgfchangelog_la-gf-changelog-journal-handler.lo
  CC       libgfchangelog_la-gf-changelog-helpers.lo
  CC       libgfchangelog_la-gf-changelog-api.lo
  CC       libgfchangelog_la-gf-history-changelog.lo
  CC       libgfchangelog_la-gf-changelog-rpc.lo
  CC       libgfchangelog_la-gf-changelog-reborp.lo
gf-changelog-reborp.c:396:35: warning: initialization of ‘int (*)(rpcsvc_request_t *)’ {aka ‘int (*)(struct rpcsvc_request *)’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  396 |                                   CHANGELOG_REV_PROC_EVENT,
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~
gf-changelog-reborp.c:396:35: note: (near initialization for ‘gf_changelog_reborp_actors[1].actor’)
gf-changelog-reborp.c:397:35: warning: initialization of ‘int (*)(int,  ssize_t *, char *, char *)’ {aka ‘int (*)(int,  long int *, char *, char *)’} from incompatible pointer type ‘int (*)(rpcsvc_request_t *)’ {aka ‘int (*)(struct rpcsvc_request *)’} [-Wincompatible-pointer-types]
  397 |                                   gf_changelog_reborp_handle_event, NULL, 0,
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gf-changelog-reborp.c:397:35: note: (near initialization for ‘gf_changelog_reborp_actors[1].vector_sizer’)
gf-changelog-reborp.c:397:69: warning: initialization of ‘int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
  397 |                                   gf_changelog_reborp_handle_event, NULL, 0,
      |                                                                     ^~~~
gf-changelog-reborp.c:397:69: note: (near initialization for ‘gf_changelog_reborp_actors[1].procnum’)
  CC       libgfchangelog_la-changelog-rpc-common.lo
  CCLD     libgfchangelog.la

(As of e5ff6cc397e7a23dff4024efb6806cb004a89ee6 )

Comment 3 Amar Tumballi 2019-05-09 10:13:55 UTC
The original issue reported in string format is now fixed as part of our 32bit/64bit compile options. But as Yaniv said in comment#2, there are other warnings with latest gcc. Recommend running compile with fedora 30 (gcc 8.3.x and above), and fixing all bugs.

Comment 4 Sheetal Pamecha 2019-07-16 13:26:41 UTC
Closing this bug as all issues mentioned in description and Comment#2 are resolved now.


Note You need to log in before you can comment on or make changes to this bug.