Skip to contentSkip to conversation

Fix warnings for XFS on 2.5.61

PATCH In review Stephen Hemminger 2 participants 2 messages Feb 17, 2003 – Feb 18, 2003 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix warnings for XFS on 2.5.61

This patch gets rid of the following warnings.

fs/xfs/support/qsort.c: In function `qsort':
fs/xfs/support/qsort.c:202: warning: duplicate `const'

fs/xfs/support/qsort.c +1 -1
diff -Nru a/fs/xfs/support/qsort.c b/fs/xfs/support/qsort.c
@@ -199,7 +199,7 @@
   {
     char *const end_ptr = &base_ptr[size * (total_elems - 1)];
     char *tmp_ptr = base_ptr;
-    char *thresh = min(end_ptr, base_ptr + max_thresh);
+    char *const thresh = min_t(char *const, end_ptr, base_ptr + max_thresh);
     register char *run_ptr;
 
     /* Find smallest element in first threshold and place it at the
#1 lore raw
Quoted 4 lines · Stephen Hemminger

This patch gets rid of the following warnings.

fs/xfs/support/qsort.c: In function `qsort':
fs/xfs/support/qsort.c:202: warning: duplicate `const'

This is a bug in recent gcc versions, submit a patch to gcc instead.