Author: sebor
Date: Wed Mar 7 18:00:07 2007
New Revision: 515888
URL: http://svn.apache.org/viewvc?view=rev&rev=515888
Log:
2007-03-07 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-349
* iostore.cpp (_C_copyfmt): Zeroed out a_size array to prevent
(bogus) gcc warnings about the variable being used uninitialized.
Modified:
incubator/stdcxx/trunk/src/iostore.cpp
Modified: incubator/stdcxx/trunk/src/iostore.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/iostore.cpp?view=diff&rev=515888&r1=515887&r2=515888
==============================================================================
--- incubator/stdcxx/trunk/src/iostore.cpp (original)
+++ incubator/stdcxx/trunk/src/iostore.cpp Wed Mar 7 18:00:07 2007
@@ -3,20 +3,27 @@
* iostore.cpp - source of the C++ Standard Library
* ios_base storage functions [lib.ios.base.storage]
*
- * $Id: //stdlib/dev/source/stdlib/iostore.cpp#10 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0. Unless required by
- * applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License
- * for the specific language governing permissions and limitations under
- * the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
@@ -223,6 +230,11 @@
memcpy (ia, rusr->_C_iarray, a_size [0] * sizeof *ia);
memcpy (pa, rusr->_C_parray, a_size [1] * sizeof *pa);
memcpy (cba, rusr->_C_cbarray, a_size [2] * sizeof *cba);
+ }
+ else {
+ // zero out array to prevent (bogus) gcc warnings
+ // about the variable being used uninitialized
+ memset (a_size, 0, sizeof a_size);
}
// copy the rest of rhs state (save for exceptions)