diff --git a/build/autoconf/lustre-build-linux.m4 b/build/autoconf/lustre-build-linux.m4
index 3d8656c8e25535c748fdd4a961d6841c28538c68..e74b180afcd50465896dbd32a7dd7c400ac0df8d 100644
--- a/build/autoconf/lustre-build-linux.m4
+++ b/build/autoconf/lustre-build-linux.m4
@@ -232,8 +232,8 @@ LB_CHECK_FILE([$LINUX_CONFIG],[],
 # at 2.6.19 # $LINUX/include/linux/config.h is removed
 # and at more old has only one line
 # include <autoconf.h>
-LB_CHECK_FILE([$LINUX_OBJ/include/linux/autoconf.h],[AUTOCONF_HDIR=linux],
-        [LB_CHECK_FILE([$LINUX_OBJ/include/generated/autoconf.h],[AUTOCONF_HDIR=generated],
+LB_CHECK_FILE([$LINUX_OBJ/include/generated/autoconf.h],[AUTOCONF_HDIR=generated],
+        [LB_CHECK_FILE([$LINUX_OBJ/include/linux/autoconf.h],[AUTOCONF_HDIR=linux],
 	[AC_MSG_ERROR([Run make config in $LINUX.])])])
         AC_SUBST(AUTOCONF_HDIR)
 LB_CHECK_FILE([$LINUX_OBJ/include/linux/version.h],[],
diff --git a/build/funcs.sh b/build/funcs.sh
index 09292d08de310c634feb1b791a0cca7399fdb779..268d84dde105b276721e5878103ecd601c690599 100644
--- a/build/funcs.sh
+++ b/build/funcs.sh
@@ -144,6 +144,9 @@ autodetect_distro() {
             "SUSE LINUX")
                 name="sles"
                 ;;
+            "Fedora")
+                name="fc"
+                ;;
             *)
                 fatal 1 "I don't know what distro name $name and version $version is.\nEither update autodetect_distro() or use the --distro argument."
                 ;;
@@ -182,6 +185,7 @@ autodetect_target() {
          rhel6) target="2.6-rhel6";;
         sles10) target="2.6-sles10";;
         sles11) target="2.6-sles11";;
+          fc15) target="2.6-fc15";;
             *) fatal 1 "I don't know what distro $distro is.\nEither update autodetect_target() or use the --target argument.";;
     esac
 
diff --git a/build/lbuild-fc15 b/build/lbuild-fc15
new file mode 100644
index 0000000000000000000000000000000000000000..0666d4170aff230782a4ffb096c050b3bb119a17
--- /dev/null
+++ b/build/lbuild-fc15
@@ -0,0 +1,7 @@
+# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
+
+source ${0%/*}/lbuild-fc
+
+# increment this if you have made a change that should force a new kernel
+# to build built
+BUILD_GEN+=".0"
diff --git a/libcfs/libcfs/workitem.c b/libcfs/libcfs/workitem.c
index 5bcab3f01b464062d490dbd9797ae03cfb8763af..3ae1f4546fe9857449cefcea671ba3b88874e29e 100644
--- a/libcfs/libcfs/workitem.c
+++ b/libcfs/libcfs/workitem.c
@@ -423,6 +423,8 @@ cfs_wi_sched_destroy(struct cfs_wi_sched *sched)
 	cfs_list_del(&sched->ws_list);
 
 	cfs_spin_unlock(&cfs_wi_data.wi_glock);
+#else
+	SET_BUT_UNUSED(i);
 #endif
 	LASSERT(sched->ws_nscheduled == 0);
 
@@ -491,6 +493,8 @@ cfs_wi_sched_create(char *name, struct cfs_cpt_table *cptab,
 		cfs_wi_sched_destroy(sched);
 		return rc;
 	}
+#else
+	SET_BUT_UNUSED(rc);
 #endif
 	cfs_spin_lock(&cfs_wi_data.wi_glock);
 	cfs_list_add(&sched->ws_list, &cfs_wi_data.wi_scheds);
diff --git a/lnet/utils/lst.c b/lnet/utils/lst.c
index 4f40bcdd4bd6d037e2d28a7ffebfd11628e77ef9..d6456e90cb9159e87c35dbbe96eff0e7616d5cbe 100644
--- a/lnet/utils/lst.c
+++ b/lnet/utils/lst.c
@@ -2008,7 +2008,6 @@ jt_lst_show_error(int argc, char **argv)
         lstcon_rpc_ent_t     *ent;
         sfw_counters_t       *sfwk;
         srpc_counters_t      *srpc;
-        lnet_counters_t      *lnet;
         int                   show_rpc = 1;
         int                   optidx   = 0;
         int                   rc       = 0;
@@ -2092,7 +2091,6 @@ jt_lst_show_error(int argc, char **argv)
 
                         sfwk = (sfw_counters_t *)&ent->rpe_payload[0];
                         srpc = (srpc_counters_t *)((char *)sfwk + sizeof(*sfwk));
-                        lnet = (lnet_counters_t *)((char *)srpc + sizeof(*srpc));
 
                         if (srpc->errors == 0 &&
                             sfwk->brw_errors == 0 && sfwk->ping_errors == 0)
diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4
index 64c14e510efcab26b9cc806574688c0ed5e56258..7797fd4dac3bd4f2703bb1b1f8bd7e3b059b1585 100644
--- a/lustre/autoconf/lustre-core.m4
+++ b/lustre/autoconf/lustre-core.m4
@@ -2451,6 +2451,7 @@ lustre/kernel_patches/targets/2.6-sles11.target
 lustre/kernel_patches/targets/2.6-oel5.target
 lustre/kernel_patches/targets/2.6-fc11.target
 lustre/kernel_patches/targets/2.6-fc12.target
+lustre/kernel_patches/targets/2.6-fc15.target
 lustre/ldlm/Makefile
 lustre/fid/Makefile
 lustre/fid/autoMakefile
diff --git a/lustre/fld/lproc_fld.c b/lustre/fld/lproc_fld.c
index 7b784eb0f6f179f49753a6ae61a3d68c425aa052..1604609f635bd471c789d75e192f14338fa23ff0 100644
--- a/lustre/fld/lproc_fld.c
+++ b/lustre/fld/lproc_fld.c
@@ -166,7 +166,6 @@ static void *fldb_seq_start(struct seq_file *p, loff_t *pos)
 	struct dt_object	*obj;
 	const struct dt_it_ops	*iops;
 	struct fld_seq_param	*param;
-	struct fld_thread_info	*info;
 
 	if (fld->lsf_obj == NULL)
 		return NULL;
@@ -180,8 +179,6 @@ static void *fldb_seq_start(struct seq_file *p, loff_t *pos)
 
 	lu_env_init(&param->fsp_env, LCT_MD_THREAD);
 	param->fsp_it = iops->init(&param->fsp_env, obj, 0, NULL);
-	info = lu_context_key_get(&param->fsp_env.le_ctx,
-				  &fld_thread_key);
 
 	iops->load(&param->fsp_env, param->fsp_it, *pos);
 
diff --git a/lustre/kernel_patches/targets/2.6-fc15.target.in b/lustre/kernel_patches/targets/2.6-fc15.target.in
new file mode 100644
index 0000000000000000000000000000000000000000..d560a468f6fbcd2d3b5737d7dfc627b02e5e8c95
--- /dev/null
+++ b/lustre/kernel_patches/targets/2.6-fc15.target.in
@@ -0,0 +1,14 @@
+lnxmaj="2.6.38.6"
+lnxrel="26.rc1.fc15"
+
+KERNEL_SRPM=kernel-${lnxmaj}-${lnxrel}.src.rpm
+SERIES=""
+EXTRA_VERSION=${lnxrel}_lustre.@VERSION@
+LUSTRE_VERSION=@VERSION@
+BASE_ARCHS="i686 x86_64"
+BIGMEM_ARCHS=""
+BOOT_ARCHS=""
+JENSEN_ARCHS=""
+SMP_ARCHS=""
+UP_ARCHS=""
+
diff --git a/lustre/llite/vvp_io.c b/lustre/llite/vvp_io.c
index 50a19c98d416e4fc823cb66a83bfcd4adff6e85d..c8f041e6dd42971babd55ab84a52ec5cda66b7e4 100644
--- a/lustre/llite/vvp_io.c
+++ b/lustre/llite/vvp_io.c
@@ -89,12 +89,11 @@ static void vvp_io_fini(const struct lu_env *env, const struct cl_io_slice *ios)
 	struct cl_object *obj = io->ci_obj;
 	struct ccc_io    *cio = cl2ccc_io(env, ios);
 	__u32 gen;
-	int   result;
 
         CLOBINVRNT(env, obj, ccc_object_invariant(obj));
 
 	/* check layout version */
-	result = ll_layout_refresh(ccc_object_inode(obj), &gen);
+	ll_layout_refresh(ccc_object_inode(obj), &gen);
 	if (cio->cui_layout_gen > 0)
 		io->ci_need_restart = cio->cui_layout_gen == gen;
 }
diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c
index 855d2eef59f972199bad49669066b7317b5b6888..4f03811b0730b1c553aecedcb5d202cdbc7d22cd 100644
--- a/lustre/mdc/mdc_locks.c
+++ b/lustre/mdc/mdc_locks.c
@@ -467,7 +467,6 @@ static int mdc_finish_enqueue(struct obd_export *exp,
 	struct req_capsule  *pill = &req->rq_pill;
 	struct ldlm_request *lockreq;
 	struct ldlm_reply   *lockrep;
-	__u64                bits = 0;
 	struct lustre_intent_data *intent = &it->d.lustre;
         ENTRY;
 
@@ -494,7 +493,6 @@ static int mdc_finish_enqueue(struct obd_export *exp,
                         ldlm_lock_decref(lockh, einfo->ei_mode);
                         einfo->ei_mode = lock->l_req_mode;
                 }
-		bits = lock->l_policy_data.l_inodebits.bits;
 		LDLM_LOCK_PUT(lock);
 	}
 
diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c
index aa79f524b7b565198e020c294ed38579fc5d9454..d772f18e3da2baa72c2e86d6f5e52b21b29df781 100644
--- a/lustre/osc/osc_request.c
+++ b/lustre/osc/osc_request.c
@@ -3578,7 +3578,7 @@ int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 
 	handler = ptlrpcd_alloc_work(cli->cl_import, brw_queue_work, cli);
 	if (IS_ERR(handler))
-		GOTO(out_client_setup, PTR_ERR(handler));
+		GOTO(out_client_setup, rc = PTR_ERR(handler));
 	cli->cl_writeback_work = handler;
 
 	rc = osc_quota_setup(obd);
diff --git a/lustre/tests/mpi/write_append_truncate.c b/lustre/tests/mpi/write_append_truncate.c
index f739266dffb8740c7e383ee9abbf69eb2ee52104..f003098726e46a5f4145c3f047f8a318916158ab 100644
--- a/lustre/tests/mpi/write_append_truncate.c
+++ b/lustre/tests/mpi/write_append_truncate.c
@@ -525,7 +525,6 @@ int main(int argc, char *argv[])
 
                         if (error == 1) {
                                 char command[4096];
-                                int rc;
 
                                 rprintf(rank, n, 0, STATUS_FMT"\n",
                                         write_char, write_size, write_size,
@@ -533,7 +532,7 @@ int main(int argc, char *argv[])
                                         trunc_offset, trunc_offset);
 
                                 sprintf(command, "od -Ax -a %s", fnames[0]);
-                                rc = system(command);
+                                ret = system(command);
                                 MPI_Abort(MPI_COMM_WORLD, 1);
                         }
                 }
diff --git a/lustre/tests/mpi/write_disjoint.c b/lustre/tests/mpi/write_disjoint.c
index a6d7e3df7e39a8508c9ba2d5a05024052b7b9b0c..9323747f940a88652613795089cda575144d2242 100644
--- a/lustre/tests/mpi/write_disjoint.c
+++ b/lustre/tests/mpi/write_disjoint.c
@@ -204,7 +204,8 @@ int main (int argc, char *argv[]) {
 
                         for (i = 0; i < noProcessors; i++) {
                                 char command[4096];
-                                int j, rc;
+                                int j;
+				
                                 if (!memcmp(read_buf + (i * CHUNK_SIZE(n)),
                                             chunk_buf[i], CHUNK_SIZE(n)))
                                         continue;
@@ -229,7 +230,7 @@ int main (int argc, char *argv[]) {
                                 }
 
                                 sprintf(command, "od -Ad -a %s", filename);
-                                rc = system(command);
+                                ret = system(command);
                                 rprintf(0, n, "data check error - exiting\n");
                         }
                 }
diff --git a/snmp/lustre-snmp.c b/snmp/lustre-snmp.c
index 93e08cad607761753adff4387e0ecf46d058701c..3225e23c9bd3e373540656fc1575c1dbab5efd19 100644
--- a/snmp/lustre-snmp.c
+++ b/snmp/lustre-snmp.c
@@ -571,7 +571,6 @@ write_sysStatus(int      action,
             size_t   name_len)
 {
   static long *long_ret;
-  int size;
   int new_value;
 
 
@@ -597,7 +596,6 @@ write_sysStatus(int      action,
 
 
         case RESERVE2:
-          size = var_val_len;
           long_ret = (long *) var_val;